Sending selected value of <select> to another script.

From: Date: Sun, 10 Dec 2000 00:12:37 +0000
Subject: Sending selected value of <select> to another script.
Groups: php.general 
Request: Send a blank email to php-general+get-29482@lists.php.net to get a copy of this message
I can get values from txt fields to be passed over to another php script on Submit, but passing over the value of a selected item from a single-choice drop down menu is eluding me :( As it stands it passes over a false/ zero value, when it should be an integer >= 1. Why is '$newcat' not passed over to the script specified in <form> on Submit ? while ($row2 = mysql_fetch_array($result)) { $newcat = $row2[category_id]; if ($category_id == $newcat) { $drop_down .= " <option value=\"$newcat\" selected>$row2[category]</option>\n"; } else { $drop_down .= " <option value=\"$newcat\">$row2[category]</option>\n"; } } ...later in <body> <select name="Category"> <? echo "$drop_down" ?> </select> TIA malco

« previous php.general (#29482) next »