Hi
i struggling with multiple select lists in HTML forms. The resulting
$_REQUEST array cuts some characters from the values. If the value is
value="999999" i will get "99" after posting...
my php file:
*******
<html><head></head>
<?php
echo "{$_SERVER['REQUEST_URI']} <br>";
echo "First: {$_REQUEST['msel'][0]} <br>";
echo "Count: " . count($_REQUEST['msel']) . "<br><hr>";
$i = 0;
foreach ($_REQUEST['msel'] as $v)
{
echo "$i: $v <br>";
$i++;
}
?>
<form method="GET" action="<?= $_SERVER['PHP_SELF'] ?>">
<select name="msel[]" size="6" multiple="multiple">
<option value="999999">erwin</option>
<option value="99999">admin</option>
<option value="9999">hm10</option>
<option value="999">hm30</option>
<option value="99">muhe</option>
<option value="9">hannes</option>
</select>
<input type="submit">
</form>
</body></html>
*******
The result after selecting all:
********
/PARAMOUNT/multisel2.php?msel%5B%5D=999999&msel%5B%5D=99999&msel%5B%5D=9999&msel%5B%5D=999&msel%5B%5D=99&msel%5B%5D=9
First: 99
Count: 6
--------------------------------------------------------------------------------
0: 99
1: 9
2:
3: 999
4: 99
5: 9
********
MY system:
PHP Version 4.2.3
Apache/1.3.26
SuSE Linux 8.1
When I use the same php file on a MS windows apache, it works
Regards Heiko
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php