checkbox in form field problem
Posted: Wed Dec 17, 2008 2:36 pm
In an update form, how do I create a checkbox field?
here is an example of my code:
I cannot get the checkbox to be checked when the database value is set to 1....
thanks
here is an example of my code:
Code: Select all
<tr><td><h3>Admin Pref</h3></td><td><input type="text" name="adminpref" value="' .$row[adminpref].'"></td></tr>
<tr><td><h3>Video</h3></td><td><input type="checkbox" name="video" value="<?php if ('.$row[video].'=="1")
{echo "checked"};?>"</td></tr>thanks