Jump to content

ThatGuyRay

New Members
  • Posts

    3
  • Joined

  • Last visited

ThatGuyRay's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks. I have actually updated the code - but no results: <input type="checkbox" id="b1" name="vehicle[]" value="Bike">I have a bike<br> <input type="checkbox" id="b2" name="vehicle[]" value="Car">I have a car <input type="checkbox" id="b3" name="vehicle[]" value="Walk">I walk <select class="form-control" name="choose" id="choose" form="sentMessage"> <option value="uno">1</option> <option value="dos">2</option> <option value="tres">3</option> </select> This may be over my head at this point. Thanks for your help.
  2. Thanks for the response. I am a definitely a novice. Im using a pre-existing form from a template and the template developer made the following suggestion: " Give unique ids to the inputs and use the ids on global variable (for ex. $_POST['your_id']). " Ive made the id edits as suggested, but still no results in email: <input type="checkbox" id="b1" name="vehicle[]" value="Bike">I have a bike<br> <input type="checkbox" id="b2" name="vehicle[]" value="Car">I have a car <input type="checkbox" id="b3" name="vehicle[]" value="Walk">I walk <select class="form-control" name="choose" id="choose"> <option>1</option> <option>2</option> <option>3</option> </select> PHP: <?php if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message']) || !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) { echo "No arguments Provided!"; return false; } $vehicles = implode(', ', $_POST['vehicles'] ); $choose = $_POST['choose']; $name = $_POST['name']; $email_address = $_POST['email']; $website = $_POST['website']; $message = $_POST['message']; // Create the email and send the message $to = 'biz@iinobe.com'; // Add your email address inbetween the '' replacing yourname@yourdomain.com - This is where the form will send a message to. $email_subject = "Website Contact Form: $name"; $email_body = "You have received a new message from your website contact form. \n\n"."Here are the details: \n\nName: $name \n\nType: $vehicles \n\nChoice: $choose \n\nEmail: $email_address \n\nWebsite: $website \n\nMessage:\n$message"; $headers = "From: noreply@gmail.com\n"; // This is the email address the generated message will be from. We recommend using something like noreply@yourdomain.com. $headers .= "Reply-To: $email_address"; mail($to,$email_subject,$email_body,$headers); return true; ?> Thanks for your help.
  3. Pulling my hair out trying to get checkbox and a selector values into my email. The only email results I recieve are: Name/Email/Website/Message I dont know what Im missing to get the Checkbox values submitted. Ive included a link and attached the files for reference. http://iinobe.com/formTest/contact.html Any insight, assistance or resources that would help solve this issue would be greatly appreciated. Thanks Ray BASIC CODE: <input type="checkbox" id="b1" name="vehicle[]" value="Bike">I have a bike<br> <input type="checkbox" id="b1" name="vehicle[]" value="Car">I have a car <input type="checkbox" id="b1" name="vehicle[]" value="Walk">I walk <select id="choose"> <option>1</option> <option>2</option> <option>3</option> </select> My additions to PHP: $b1 = implode(', ', $_POST['b1'] ); $choose = $_POST['choose']; \n\nType: $b1 \n\nChoice: $choose
×
×
  • 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.