Okay, I want to first indicate that I have not touched PHP or any coding outside of RGSS3 since like 2004. In high school. Where I was forced to. lol.
Here’s what I need:
I have an online Request for Quotation form with a drop-down menu. If the client selects “commercial” from the drop-down menu, then it goes to two emails, and if the client selects “Military” from the drop-down menu, it goes to two other emails.
I have the form and drop-down menu set up properly, and assigning the calls properly. I can get ti to send emails 100% until I try and add that conditional branch in there. Can somebody please tell me what is going wrong with this? Any help would be sincerely appreciated.
[php]
<?php if($user == "Commercial"){ $to = "[email protected]"; $cc = "[email protected]"; }elseif($user == "Military"){ $to = "[email protected]"; $cc = "[email protected]"; }else{ echo "Please specify end user."; } $company = $_POST['company']; $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $fax = $_POST['fax']; $user = $_POST['user']; $pn= $_POST['pn']; $nomen = $_POST['nomen']; $qty = $_POST['qty']; $dolladolla = $_POST['dolladolla']; $comments = $_POST['comments']; $formcontent="From: $name \n Company: $company \n Phone Number: $phone \n Fax: $fax \n Email Address: $email \n End User: $user \n NSN: $nsn \n Part Number: $pn \n Description: $nomen \n Quantity: $qty \n Target Price: $dolladolla \n Comments: $comments"; $recipient = $to.", ".$cc; $subject = "Contact Form"; $mailheader = "From: $email \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); echo "Thank you for your submission. A representative from STAT Industry will contact you shortly with your requested information. You will be re-directed shortly."; } ?>[/php]