PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
would anybody know if i'm on the right track now... i was total over looking the == thing again ... i though i fixed that after it was pointed out lol... oh well
foreach ($HTTP_POST_VARS['mark'] as $key=>$val) {
check_msg = "Checked: $val\n";
if ($check_msg = $val) {
Like you have pointed out you simply don't understand the simple language contructs, which is why your having so many problems modifying this code.
Lets start simple. I assume that the array $HTTP_POST_VARS['mark'] (it should be $_POST['mark'], by the way) is the group of checkbox html elements. Is this correct?
If so, you will only ever get the value of the checkboxes that have been checked. So if you do not check a particular checkbox it will not be represented in the $_POST superglobal. So if you have the value in your array thats how to determine if the checkbox has been checked or not.
Now i got it.... but i had to add a check box the was none so one would have to select None to have none... with a valadation script i think this is close enough... an ideas on it are welcomed... thank for all the help...