More form questions
| From: | Ashley M. Kirchner | Date: | Thu, 08 Aug 2002 18:33:01 +0000 |
| Subject: | More form questions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111707@lists.php.net to get a copy of this message | ||
One of the fields on a form I'm building consists of multiple checkboxes.
How can I check whether at least one is selected?
The form looks like this:
<td align="left">Permission to Post:<br>
<blockquote>
<input type="checkbox" name="Post1"<? echo (($Post1 == 1) ? "
checked" : "");
?>> Email Address<br>
<input type="checkbox" name="Post2"<? echo (($Post2 == 1) ? "
checked" : "");
?>> Personal URL<br>
<input type="checkbox" name="Post3"<? echo (($Post3 == 1) ? "
checked" : "");
?>> News About Me<br>
<input type="checkbox" name="Post4"<? echo (($Post4 == 1) ? "
checked" : "");
?>> Photos<br>
</blockquote>
</td>
--
W | I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley@pcraft.com> .
303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303,
U.S.A.