Re: [PHP] Check box with same name
Add square brackets to the end of the name of each check box, ie... And on the page you submit the form too, you will be able to access this as an array... $_POST['searchStr'] or $_GET['searchStr'], depending on the method the form was posted by. ppf wrote: Hi all: I am having a problem in accessing form data from multiple check box of same name with different values, like this value="Where"> Where name="searchStr" value="would"> would name="searchStr" value="Luluk,"> Luluk, width="40%"> name="searchStr" value="Indonesian"> Indonesian ons, How can i access these multiple selected value in same name? I am trying to move my asp code to PHP, Thanks in advance Prad __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Check box with same name
Hello, Use an array: Note: Only checked checkboxes are passed. Access: print $_REQUEST['foo'][0]; // the first one print $_REQUEST['foo'][1]; // the second You can use named indices too: print $_REQUEST['foo']['bar']; Mix and match, have fun. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Check box with same name
Hi all: I am having a problem in accessing form data from multiple check box of same name with different values, like this Where would Luluk, Indonesian ons, How can i access these multiple selected value in same name? I am trying to move my asp code to PHP, Thanks in advance Prad __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php