Form Dengan Single Checkbox 21.05.08

Borang ringkas dengan satu checkbox.

[code lang="php"]
<html>
<body>
<?php
if(isset($_POST['hantar']))
{
if(isset($_POST['bantuan']) == 'Ya')
echo "Perlukan bantuan.";
else
echo "Tidak perlukan bantuan.";
}
else
{
?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Anda perlukan bantuan?
<input type="checkbox" name="bantuan" value="Ya" />
<input type="submit" name="hantar" value="Hantar" />
</form>

<?php
}
?>

</body>
</html>
[/code]

Demo

Related Articles

Wanna say something?

If you've got an opinion about Form Dengan Single Checkbox - then why not say something? You can even subscribe to these comments via RSS!

:

: