Forum Moderators: coopster
Farhan
Firslty..when you create the edit panel u gonna use a similar form (similar with the one u need to post variables)...however, in that form u will check if the check box is checked (if there is a value in the field in the table)...so a bit of php is needed...
example:
<?
if ($TV == '1')
{?>
<input type="checkbox" name="TV" value="Y" checked>
TV
<? }
else
{
?>
<input type="checkbox" name="TV" value="Y">
TV
<?
}
?>
afterwards, when the user posts the form then u delete the field and udate it afterwards...I empty it first and the update...
example:
$TV = HTTP_POST_VARS['TV'];
$query33 = "update Hotels set TV='' where ID='$ID'";
$result33 = mysql_query($query33);
$query34 = "update Hotels set TV='$TV' where ID='$ID'";
$result34 = mysql_query($query34);
u need some error checking code after to check if results are ok...
thats the way i handle check boxes updatesss
...hope the best ;-)