Jump to content

PHP form that sends to email HELP


Crisam

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/275098-php-form-that-sends-to-email-help/
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.