This topic is locked

Getting information from a field on Search page

2/18/2008 3:26:13 PM
PHPRunner General questions
G
gr8hands author

I want to take the data a user enters into one field (ProspectID) on a Search form and do a SQL update based on that.
When I try to put in a snippet, it only offers &$params as a possibility, but there doesn't seem to be any clear way to get the item from the actual Search form.
How would I do that?

J
Jane 2/19/2008

Hi,
do you want to use simple or advanced search?

G
gr8hands author 9/9/2008

Simple search.

J
Jane 9/10/2008

Hi,
check passed parameters in the URL and then use it in your code:

if (@$_REQUEST["a"]=="search")

{

echo $_REQUEST["SearchFor"];

//your code here

}

T
thesofa 9/10/2008

How would I do it for an advanced search with 3 or 4 parameters filtered?

J
Jane 9/11/2008

Hi,
please check list of all session variables here:

http://www.xlinesoft.com/phprunner/docs/ph...n_variables.htm

T
thesofa 9/11/2008

Hi,

please check list of all session variables here:

http://www.xlinesoft.com/phprunner/docs/ph...n_variables.htm



Does that mean that I can access all of the search criteria by referencing that array and assigning values from the array to a variable?

So If i searched for records between 2 dates, I could put a header on the results page along the lines of "Report for the period 1/1/2008 to 2/2/2008?using

values from the two arrays

$_SESSION[$strTableName."_asearchfor"] and $_SESSION[$strTableName."_asearchfor2"]?

what would the syntax be like please?

lets assume that the field is called Week.
Cheers

J
Jane 9/11/2008

Hi,
I recommend you to print all session values and then select required:

print_r($_SESSION);