Crisam Posted March 1, 2013 Share Posted March 1, 2013 Hi I am having trouble getting your contact form to use a slight modification with checkbox So far I have the form setup correctly and its is suppose to be a form where users can select between 2 meals and an email will be sent to our chefs so they can know how much to make for the day. I wanted to use an if else statement with php to handle the checkboxes when on person chooses one and not he other the form will be sent if they choose BOTH it will throw an error.Any advice will be greatly appreciated.Thank You Below i have my forms that I am using and would like just a little point in the right direction along with a very cool php tutorial on changing forms Chris Samuelsend_form_email.phpcontactform.htm Quote Link to comment https://forums.phpfreaks.com/topic/275098-php-form-that-sends-to-email-help/ Share on other sites More sharing options...
trace96 Posted March 2, 2013 Share Posted March 2, 2013 For good practice I suggest if you define a variable ($mycheckbox = $_POST['mycheckboxB'] you stick to it. In lines 55-56 you make a reference back to $_POST['mycheckboxB'] You never define $mycheckboxA or $mycheckboxB but you reference to them in lines 84-85 .. You have two $mycheckbox Quote Link to comment https://forums.phpfreaks.com/topic/275098-php-form-that-sends-to-email-help/#findComment-1415932 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.