Re: problem with foreach
| From: | Ludovic André | Date: | Mon, 22 Oct 2007 17:57:59 +0000 |
| Subject: | Re: problem with foreach | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263514@lists.php.net to get a copy of this message | ||
Adam Williams a écrit :
I have an html page with checkboxes: [...] but I'm getting the error: you selected: *Warning*: Invalid argument supplied for foreach() in */var/www/sites/mdah-test/museum/mmhsurvey/mailform2.php* on line *81* I googled some checkbox/foreach pages on google, but I don't see where I'm going wrong. I'm running php 5.2.5 on Apache 2.2.4 on Fedora Linux. Any help? Simple question: did you check any of the boxes before submitting? If not, then it's the reason of this error... The array does not appear in the posted variables as a not-checked checkbox is not submitted along.But all the other comments of this thread are to be taken into account as well ( $_POST['option'], trying to print_r($_POST), ...) Ludovic André