Código PHP:
Ver original<?php
function isChecked($value)
{
if (isset($_POST['coche'])) {
{
return " CHECKED";
}
}
return "";
}
?>
<form method="post" id="form" name="form" action="form.php">
<input type="checkbox" name="coche[]" value="ford" <?php echo isChecked('ford'); ?>> ford<br />
<input type="checkbox" name="coche[]" value="opel" <?php echo isChecked('opel'); ?>>opel<br />
<input type="checkbox" name="coche[]" value="peugeot" <?php echo isChecked('peugeot'); ?>> peugeot<br />
<input type="submit" value="enviar" />
</form>
Ahi va, enterito ;)