|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-19 23:24 UTC] youngga at hotmail dot com
sorry, my english. When I send array with http form, the count of array is duplicate at server page. //My source at http form..... <select name='my_val[]' size='3' onfocus='set_check()' multiple> <option value=' 1'>val1</option> <option value=' 2'>val2</option> <option value=' 3'>val3</option> </select> //My source at server page... count(my_val); // the count value is different from I selected. So I have tested on PHP4.1.2 then no troubles. What is the problem ? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
Thanks your comment. But I set register_glovals On already. My test page is www.ftpmail.com/test/test_array.php , please try and check it. The page source is following. --------------------------------------------------- <html> <head> <title>test_array</title> </head> <body> <table align="center" border="0"> <tr> <td> <p>Array form tranasfer test page. <p>Select value then click submit.</p> <p>Use shift or crtl key for multi select.</p> <form name="files_up" action="<? echo $PHP_SELF; ?>" method="post"> <select name='test_val[]' size='5' multiple> <option value='val1'>val1</option> <option value='val2'>val2</option> <option value='val3'>val3</option> <option value='val4'>val4</option> <option value='val5'>val5</option> </select> <input type="submit" name="sub1" value="submit"> </form> <?php if(!empty($HTTP_POST_VARS["test_val"])) { $nums = count($HTTP_POST_VARS["test_val"]); echo "no of count = ".$nums."<br><br>"; for($i=0; $i < $nums; $i++) { echo "<br>test_val[".$i."] = ".$HTTP_POST_VARS["test_val"][$i]; } } ?> <p> </p> <p><a href="menu.htm">go to menu</a></p> </td> </tr></table> </body> </html> --------------------------------------------------------- You can see my homepage's phpinfo() at www.ftpmail.com/test.php I am looking forward your answer.