...

View Full Version : Php Checked Box Problem



coolumanga
11-05-2010, 09:22 AM
i have 4 checked boxes in my form .....

when the editing page how can i get checkbox checked or not cheked


option 1 Checkbox1
option 2 Checkbox2
option 3 Checkbox3
option 4 Checkbox4

if the database checkbox1 value=1 value ..

how can i retreiwed to the edit page Checkbox1 checked.


plz plzzzzzzzzzz give me sample code for this..........................

poyzn
11-05-2010, 09:45 AM
<?php
if($checkbox1) {
$checked1 = ' checked="checked" ';
}
?>
<input type="checkbox" name="checkbox1" <?php echo $checked1; ?> />

coolumanga
11-05-2010, 10:31 AM
<?php
if($checkbox1) {
$checked1 = ' checked="checked" ';
}
?>
<input type="checkbox" name="checkbox1" <?php echo $checked1; ?> />


Thankz a lot for the help


Thankzzzzzzzzzzzzzzz



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum