Jump to content

GizmoPig

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

GizmoPig's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok, I'm now at a point where my queryfailed.shtml page is coming up when I submit the form. This appears to show it's working but could anyone help with getting the email to actually send. I haven't changed the code except for adding the missing } at the bottom of the code.
  2. That's got me a bit further - it sends to the php page now but still nothing in the inbox. Thanks for that one - at least I've got some change now so can work on why there's no email yet.
  3. Hi Sorry if I've miseed this one in the forums - have been searching for some time and nothing really matches the problem I'm having. I want to create a form that emails query to a different email address depending on what radio button is selected. I'm finding that my submit button isn't working. It's the first time that I've tried to do this particular form and have only been building php for a week or so, so please go easy on me (I do have proper training booked) This is the first time my submit hasn't worked so I'm wondering if the code that controls the email array means that I have to change the submit code? Just a guess. I've got the following html code: <form method="POST" action="housekeeping_mailer.php"> <input name="Name" type="text" id="Name" size="20"\><br /><br /> <b>Email Address:</b><br /> <input name="Email" type="text" id="Email" size="20"\> <p> <b>Mobile Number:</b><br /> <input name="Mobile" type="text" id="Mobile" size="20"\> <p> <b>Dealer(FCS) Code:</b><br /> <input name="FCS" type="text" id="FCS" size="20"\> <p> <b>Vehicle Registration:</b><br /> <input name="Reg" type="text" id="Reg" size="20"\> <p> <input type="radio" name="Query" value="Logistics" checked\> <b>Logistics Query </b></p> <input type="radio" name="Query" value="HPI"\> <b>HPI Query </b></p> <p> <input type="radio" name="Query" value="V5"\> <b>V5 Query </b></p> <p align="left"> <textarea name="Textarea" cols="50" rows="5">Type your query here...</textarea> <br /><br /><input type="submit" value="Submit" name="submit"></form> and the following php code: <?php if(isset($_POST['submit'])) { $name = $_POST["Name"]; $email = $_POST["Email"]; $mobile = $_POST["Mobile"]; $fcs = $_POST["FCS"]; $reg = $_POST["Reg"]; $subject = $_POST["Query"]; $logistics = $_POST["Logistics"]; //logistics $HPI = $_POST["HPI"]; //hpi $V5 = $_POST["V5"]; //v5 $message = $_POST["Textarea"]; $subject = "Housekeeping - $subject Query"; $emailgroup = $_POST["Query"]; $emailmessage = "Contacts Name: $name\nEmail Address: $email\nQuery Type: $subject\nQuery is: $message"; $email1 = "[email protected]"; $email2 = "[email protected]"; $email3 = "[email protected]"; if ($emailgroup == "logistics") {$messagesent = mail($email1, $subject, $emailmessage,"From: $email\r\n" . "Reply-To: $email"); include "./querysent.shtml";} elseif ($emailgroup == "HPI") {$messagesent = mail($email2, $subject, $emailmessage,"From: $email\r\n" . "Reply-To: $email"); include "./querysent.shtml";} elseif ($emailgroup == "V5") {$messagesent = mail($email3, $subject, $emailmessage,"From: $email\r\n" . "Reply-To: $email"); include "./querysent.shtml";} else include "./queryfailed.shtml"; ?> Thanks in advance!
×
×
  • 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.