Hi All, I have a mysql database table called "personnel" with a column called "inactive" which is type enum('0','1') Default '0'.

I have an edit personnel form with a checkbox called inactive. What I need to do is....

If the checkbox is selected, update the "inactive" column in the "personnel" table setting "inactive" to '1'.

I'm just not sure how to do this or how PHP handles checkboxes. What does it set the value to, etc?

Here's my checkbox code...probably not right.

echo '<INPUT TYPE="checkbox" name="inactive" value="" '.$checked.'>';

and here's what I'm currently doing to when I pull the data back out.

// Inactivate Row Within Table
					if ($row_selected['inactive']==1) {
						$checked='checked';
					} else {
						$checked='';
					}

As always, any help is much appreciated.

Scott

    Write a Reply...