RE: [PHP] checkbox checked?
| From: | Mark Peoples | Date: | Sun, 22 Oct 2000 00:35:04 +0000 |
| Subject: | RE: [PHP] checkbox checked? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21614@lists.php.net to get a copy of this message | ||
Oops. =)
Add: print("</form>"); after printing the submit button
marco
-----Original Message-----
From: Mark Peoples [mailto:gascsd@gascairlines.com]
Sent: Saturday, October 21, 2000 5:34 PM
To: php-general@lists.php.net
Subject: RE: [PHP] checkbox checked?
<?php
if(!$submit)
{
print("<form method=\"post\" action=\"$PHP_SELF\">");
print("<input type=\"checkbox\" name=\"box1\" value=\"yes\"
checked>Check
Box");
print("<input type=\"submit\" name=\"submit\">");
}
if($submit)
{
if($box1 == "yes")
{
print("The check box was checked");
//other code
}
}
?>
marco
-----Original Message-----
From: Gary [mailto:deadfred@2die4.com]
Sent: Saturday, October 21, 2000 5:32 PM
To: php-general@lists.php.net
Subject: [PHP] checkbox checked?
How would I check if a checkbox is checked? I have a form that will
require the one checkbox in it, to be checked. I have learned how to
validate mail, names, ETC, but I have run into a wall on this one.
TIA
Gary
--
The sad thing about artificial intelligence is that it lacks artifice
and therefore intelligence. Jean Baudrillard (1929), French semiologist.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net