RE: [PHP-DB] Passing selection to next page
| From: | Snijders, Mark | Date: | Thu, 19 Dec 2002 11:05:15 +0000 |
| Subject: | RE: [PHP-DB] Passing selection to next page | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24276@lists.php.net to get a copy of this message | ||
I guess this all is in a form
so on the next page it should be in:
echo $_POST[department];
or in
echo $department depending on the php version
-----Original Message-----
From: Alex Francis [mailto:afrancis@camerondesign.co.uk]
Sent: donderdag 19 december 2002 12:05
To: php-db@lists.php.net
Subject: [PHP-DB] Passing selection to next page
I have a drop down list created using the following code and am having
trouble passing my selection to the next page. Can anyone help?
<?
$query = "select distinct department from courses order by department";
$result = mysql_query($query);
echo "<SELECT ID='Category Combo Box' NAME='department'>";
echo "<OPTION VALUE=' ' SELECTED>Select Department</OPTION>";
While ($row = mysql_fetch_assoc($result))
{
echo "<OPTION VALUE='";
echo stripslashes($row["department"]);
echo "'> ";
echo stripslashes($row["department"]);
echo "</OPTION>";
}
echo "</SELECT>";
mysql_free_result($result);
?>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php