Log in

View Full Version : Checkbox value in forms



lord_havoc
11-02-2007, 01:22 AM
If you have a form with checkboxes, something like



<input class="check" type="checkbox" name="HTML" id="HTML" value="HTML">HTML


And the email I receive looks like this:


First_name: Shayne
Last_name: Martin
Email: apply@cyanideperfection.net
Css: CSS
Ftp: FTP
Html: HTML


How would I get it to say "Yes" if the item is checked and otherwise "No"? So it looks like this:



First_name: Shayne
Last_name: Martin
Email: apply@cyanideperfection.net
Css: Yes
Ftp: Yes
Html: Yes


Sorry this is a bit confusing. I don't really know any other way of explaining myself.

<EDIT>
Would this even be possible for the HTML end to handle?
Would the PHP have to take care of it?
</EDIT>

Twey
11-02-2007, 02:43 AM
$_GET['HTML'] ? 'Yes' : 'No';