Hi dear friend,
I have multiple check boxes ...and I gave the single name to all check boxes..... If I post to my php script I am not getting all the values as an array.....I am getting only one value(last value)..... ===================================== <html> <head> <script language="javascript"> function checkitall() { var n=0,i=document.form1.OptionList.length; while(n<i) { if(document.form1.checkall.checked) { document.form1.OptionList[n].checked=true; n=n+1; } else { document.form1.OptionList[n].checked=false; n=n+1; } } } function approve() { document.form1.method="post"; document.form1.action="./approve_f.php"; document.form1.submit(); return true; } </script> </head> <body bgcolor="#FFFFFF" text="#000000"> <form name="form1" method="post" > <table> <tr> <td><input type="checkbox" name="OptionList" value="something1">Option 1</input></td> <td>Hello</td> </tr> <tr> <td><input type="checkbox" name="OptionList" value="something2">Option 2</input></td> <td>Hi</td> </tr> <tr> <td><input type="checkbox" name="OptionList" value="something3">Option 3</input></td> <td> How r u</td> </tr> <tr> <td><input type="checkbox" name="checkall" OnClick=checkitall()>Check All</input></td> </tr> <tr> <td><input type="submit" name="approve" OnClick="return approve();">Check All</input></td> </tr> </table> </form> </body> </html> =============================== If I give name as OptionList[] I am getting an error for selectAll option. Any help would be greatly appreciable. Thanks and regards Balaji
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ***************************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php