RE: [PHP-WIN] Multiple value selection box (mix php/html problem) returning only one value
| From: | Matt Williams | Date: | Wed, 23 May 2001 08:13:31 +0000 |
| Subject: | RE: [PHP-WIN] Multiple value selection box (mix php/html problem) returning only one value | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-7865@lists.php.net to get a copy of this message | ||
Hi Michael
Just tried this
---------------------------------
<form name="form1" method="get" action="<?= $PHP_SELF;
?>">
<select name="list[]" size="3" multiple>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<input type="submit" name="Submit" value="Submit">
</form>
<?
reset ($list);
while (list ($key, $val) = each ($list)) {
echo "$key => $val<br>";
}
?>
------------------------------------
And it prints
0 => 1
1 => 2
2 => 3
OK on to the few HTML probs I've found
They are tabnle related really.
no opening table tag
closing table tag comes before closing row tag and closing select
no <td> or </td>
maybe it would be easier to break out of php into html to set up your table
and maybe use <td align="center"> instead of all the <center> tags
HTH
M@