selected option values not being captured by form processing software
| From: | Nicole Lallande | Date: | Tue, 13 Mar 2001 17:36:18 +0000 |
| Subject: | selected option values not being captured by form processing software | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43692@lists.php.net to get a copy of this message | ||
Hi,
Working on a code that uses a select/option field. All my other fields
are passing through to the form processing software just fine. Meloni's
PHP Essentials does this funky thing, declaring each function value as
selected or not although she shows it with the individual values not
with variable - and I don't understand why she is doing that - I don't
see it anywhere else. What I do know is whether I try her if_else
selected method or without, my value is not being passed through http.
echo "<td width=\"550\" align=\"left\"><select
name=\"select_product\">";
echo "<option value=\"\">Cat. ID No? Description Pkg Size
Price</option>";
while ($row = mysql_fetch_array($result)) {
$catid[] = $row["Cat_ID"];
}
for ($i=0; $i < sizeof($catid); $i++) {
$cat = $catid[$i];
if($select_product =="cat") {
echo "<option value=\"$cat\" selected>$cat</option>";
} else {
echo "<option value=\"$cat\">$cat</option>";
}
Thanks,
Nicole
--
########################
Nicole Lallande
nicole@nmlconsulting.com
760.753.6766
########################