View Single Post
  #1 (permalink)  
Old Jul 7th, 2007, 17:49
Pádraig Pádraig is offline
SuperMember

SuperMember
Join Date: Apr 2007
Location: Ireland
Age: 15
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Contact Form Trouble.

Sorry if this question has been asked before.

I'm having some trouble with my php contact form. Everything sends except the selected option in the question area.

HTML:
Code: Select all
<form action="php-contact-form.php" method="post">
     <p>Name:<br><input type="text" name="name"></p>
     <p>E-mail:<br><input type="text" name="email"></p>
     <p>Question:<br><select name="Question">
     <option value="Site Design">Site Design</option>
     <option value="Coding Your Mock-Up">Coding Your Mock-Up</option>
     <option value="Site Maintenance">Site Maintenance</option>
     <option value="Logo Design">Logo Design</option>
     <option value="Other">Other</option>
     </select></p>
     <p>Comments:<br><textarea name="comments" rows="6"    cols="35"></textarea></p>
     <p><input type="submit" value="Send"></p>
</form>
PHP:
Code: Select all
<?php
$subject = "New Email From PadraigCurran.com";
$your_email = "info@padraigcurran.com";
$success = "formdone.html";
$name = $_POST["name"];
$email = $_POST["email"];
$question = $_POST["question"];
$comments = $_POST["comments"];
$msg = "Name: $name\n";
$msg.= "E-mail: $email\n";
$msg.= "question: $question\n";
$msg.= "Comments: $comments";
mail($your_email, $subject, $msg);
header("Location: $success");
?>
The contact form can be found at http://padraigcurran.com/contact

Last edited by Pádraig; Jul 7th, 2007 at 19:14.
Reply With Quote