views:

46

answers:

2

I have a checkboxes on my site that when unchecked, update their row in in the db as unchecked, and if checked,update their row in the db as checked. I am creating an ifstatement that will commence with its command if checked, and not if unchecked. I have echoed the variable and it is holding the proper value (checked or unchecked) but not sure if I am syntactically correct on displaying the state of the row in the db.

This is what I am trying and will not work. I am new at php still and thank you very much for any help.

if($auth->check_prof == 'checked'){// do the stuff in here}
A: 
B11002
A: 

It might be a problem of confusing $auth->check_prof and $auth['check_prof'].

Are you sure $auth is an object? If not, try if ($auth['check_prof'] == 'checked').

Joel L