checkbox validation

From: Date: Wed, 18 Apr 2001 19:43:15 +0000
Subject: checkbox validation
Groups: php.general 
Request: Send a blank email to php-general+get-49147@lists.php.net to get a copy of this message
Hi all I have a form with the checkbox like this <form> $query="select id from foo"; $result=($query,$con); while ($row = mysql_fetch_array($result)) { <input type="checkbox" name="$id" value="on"> } ....submit button and stuffs here... </form> After I submit to next page, at next page, how do I check which check box is checked? like this? if ($id=="on") { do something }else{ do something } I did try this but did not work, what am i suppose to do to achieve this? Jack jacky@activelifestyle.com "There is nothing more rewarding than reaching the goal you set for yourself"

« previous php.general (#49147) next »