checking if checkboxes are checked

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!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You may want to know that the last if() you have will always be true.

hint: = is assignment.
jmilane
Forum Commoner
Posts: 89
Joined: Mon Aug 07, 2006 6:05 pm

Post by jmilane »

feyd wrote:You may want to know that the last if() you have will always be true.

hint: = is assignment.
Yeah, I figured that... freaked out and posted it a few posts ago.

I think youre great, by the way. You always try to help and are a very solid dude. A fine man.

Anyhow...

I went to this:

Code: Select all

if (isset($_POST['business_chkbox'])) { 
$checked = "yes"; 
}
Because if there isnt that variable in the $_POST then it shouldnt set $checked to "yes"

and it STILL doesnt work!!!

Oh no!!! Oh no oh no!

It SHOULDNT BE SET!!!!

IT ISNT!!!! It doesnt even EXIST!!!!
Post Reply