Passing variables from a primary web page to a web page that is two levels below
| From: | Ron Allen | Date: | Tue, 29 Apr 2003 08:09:34 +0000 |
| Subject: | Passing variables from a primary web page to a web page that is two levels below | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145595@lists.php.net to get a copy of this message | ||
This is on the first page starting the query.
<select name="SEARCH" onChange="document.inventorysearch.submit()">
<OPTION>SELECT
<option>CAMP
<option>LIN
<option>NSN
<option>SERIAL
<option>DRAGON
<option>STATUS
</select>
Second page
<?PHP
$SEARCH = $_POST["SEARCH"];
include 'drop.php';
$DBName = "******";
$table = "*****";
$db = mysql_connect("$DBhost","$DBuser","$DBpass") or
die("Problem
connecting");
mysql_select_db("$DBName") or die("Problem selecting database");
$query = "SELECT * FROM $table";
$result = mysql_query($query) or die ("Query failed");
//let's get the number of rows in our result so we can use it in a for loop
$numofrows = mysql_num_rows($result);
?>
Third page
<input type="hidden" name="SEARCH" value="<? echo $SEARCH;
?>">
I have tried $SEARCH = $_POST["SEARCH"]; on the third page as well, but that
does not work.
Any help would apprciated!