Lamez Posted August 21, 2008 Share Posted August 21, 2008 I use to have a long php script, but some how I lost it. I was wondering how could I process multiple check boxes? If checked: update mysql database if not checked: do nothing Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted August 21, 2008 Share Posted August 21, 2008 <?php foreach($_POST as $a => $b) { if ($a != "yes") { echo "not ticked"; } elseif ($a == "yes") { echo "ticked"; } } ?> Quote Link to comment Share on other sites More sharing options...
Lamez Posted August 21, 2008 Author Share Posted August 21, 2008 so I do not get it, does that mean $a is checked? what is $b? is ticked, mean checked? -Thanks Once Again! Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted August 21, 2008 Share Posted August 21, 2008 Something similar to this: http://phpsnips.com/snippet.php?id=11 Quote Link to comment Share on other sites More sharing options...
Lamez Posted August 21, 2008 Author Share Posted August 21, 2008 hey that seems a little easier to understand, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.