Computing.Net > Forums > Web Development > Adding checkboxes to my mailme.php

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Adding checkboxes to my mailme.php

Reply to Message Icon

Name: cedwards
Date: February 26, 2009 at 17:00:41 Pacific
OS: Windows XP
Subcategory: PHP
Comment:

I'm pretty much a newbie but have managed to create a contact info form and with them help of others a mailme.php to get the info emailed back to me once submitted. My only issue is adding the checkboxes that are checked to my php so that info is also mailed to me.



Sponsored Link
Ads by Google

Response Number 1
Name: shutat
Date: February 26, 2009 at 17:31:48 Pacific
Reply:

The checkbox, I believe, will exist within the $_POST array only if it's set. To check it, use isset.

if(isset($_POST["chk"]) && $_POST["chk"] === "on") { 
   echo $_POST["chk"]; 
}

check here to... <input name="chk" type="checkbox">

HTH


-1
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Adding checkboxes to my mailme.php

Cannot connect to MySQL with PHP www.computing.net/answers/webdevel/cannot-connect-to-mysql-with-php/1668.html

PHP, MySQL, phpMyAdmin www.computing.net/answers/webdevel/php-mysql-phpmyadmin/1590.html

HomePC serve pages to my work PC www.computing.net/answers/webdevel/homepc-serve-pages-to-my-work-pc/1505.html