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:
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>";
<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>
<input type="submit">

The result after selecting all:
First: 99
Count: 6

0: 99
1: 9
3: 999
4: 99
5: 9

MY system:
PHP Version 4.2.3
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

Reply via email to