Jump to content

ChrisCCPHP

New Members
  • Posts

    4
  • Joined

  • Last visited

ChrisCCPHP's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks ginerjm I'll do some reading this weekend and see if I can get working Monday.
  2. Thank you all for your help. I think I understand, but please let me know if this is not correct. All the additional form fields should be in the $message variable? So it should look something like this: $message = "address " . $_POST['address'] . "\n" . "city " . $_POST['city'] . "\n" . "state_province" . $_POST['state_province'] . "\n" . "country" . $_POST['country'] . "\n" . "zippost" . $_POST['zippost'] . "\n" . "tel " . $_POST['tel'] . "\n" . "brochure_1 " . $_POST['brochure_1'] . "\n" . "brochure_2 " . $_POST['brochure_2'] . "\n". "brochure_3 " . $_POST['brochure_3'] . "\n" . "brochure_4 " . $_POST['brochure_4'] . "\n" ;
  3. Thank you for you help mac_gyver I will do more reading before attempting another script. Are you saying I cannot use the php mail() function because my form exceeds the maximum 5 parameters, or are you saying there is a way to return the additional parameters in the message parameter?
  4. I copied a template and changed as necessary for my form. php is working on the site/domain, I've managed to get a simpler version to run properly. The names have been changed to protect the innocent. Any help would be greatly appreciated. <?php if(isset($_POST['submit'])){ $to = "me@mydomain.com"; // this is my Email address $from = $_POST['email']; // this is the sender's Email address $name = $_POST['name']; $email = $_POST['email']; $address = $_POST['address']; $city = $_POST['city']; $state_province = $_POST['state_province']; $country = $_POST['country']; $zippost = $_POST['zippost']; $tel = $_POST['tel']; $Product_1__Qty = $_POST['Product_1__Qty']; $Product_2__Qty = $_POST['Product_2__Qty']; $Product_3__Qty = $_POST['Product_3__Qty']; $Product_4__Qty = $_POST['Product_4__Qty']; $subject = "Product Oder"; $subject2 = "Copy of your Product Oder"; $message = $name . " " . $company . " Ordered the following:" . "\n\n" . $_POST['message']; $message2 = "Here is a copy of your message " . $name . "\n\n" . $_POST['message']; $headers = "From:" . $from; $headers2 = "From:" . $to; mail($to,$subject,$message,$headers,$name,$company,$tel,$address,$city,$state_province,$country,$zippost, $Product_1__Qty,$Product_2__Qty, $Product_3__Qty,$Product_4__Qty); //emails form data //mail($from,$subject2,$message2,$headers2, $name,$company,$tel,$address,$city,$state_province,$country,$zippost, $Product_1__Qty,$Product_2__Qty, $Product_3__Qty,$Product_4__Qty); // sends a copy of form data to the sender { header("Location:http://www.mydomain.com");// Redirect } } ?> <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Untitled Document</title> <style type="text/css"> body,td,th { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, sans-serif; font-size: 12px; color: #1A6F84; } body { Form continues hereā€¦.
×
×
  • 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.