# PHP mailer problem

**URL:** <https://forum.kirupa.com/t/php-mailer-problem/197296>\
**Category:** Uncategorized\
**Created:** [August 15, 2006, 10:57am UTC](https://forum.kirupa.com/t/php-mailer-problem/197296 "2006-08-15T10:57:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [August 15, 2006, 10:57am UTC](https://forum.kirupa.com/t/php-mailer-problem/197296/1 "2006-08-15T10:57:57Z")

</div>

ok… I was on the tutoril of how to make a php contact page… So I done it and everything but i needed to add a dropdown dox… this was named “reason”. Everything seemed alright when looking at the code but when I tryed it I recived an error parse so somthing… Now I was confused!

Here is the codes

HTML:

```auto
        <p>&nbsp;<form method="POST" action="mailer.php">
   Name:&nbsp;&nbsp;
   <input type="text" name="name" size="19"><p>Reason:
    <select size="1" name="reason">
    <option>Script Error</option>
    <option>Help</option>
    <option>Website Bug</option>
    <option>Chit Chat</option>
    <option>Other</option>
    </select><br>
   <br>
   Email:&nbsp;&nbsp;
   <input type="text" name="email" size="19"></p>
    <p>Text:<br>
   <textarea rows="9" name="message" cols="36"></textarea>
   <br>
   <br>
   <input type="submit" value="Submit" name="submit">
</p>
</form></p>

```

and the PHP

```auto
 <?php
if(isset($_POST['submit'])) {

$to = "support@chrisphp.com";
$subject = "Contact from Chrisphp.com";
$name_field = $_POST['name'];
$dropdown = $_POST['reason'];
$email_field = $_POST['email'];
$message = $_POST['message'];
 
$body = "From: $name_field
 E-Mail: $email_field
 Message:
 $message";
 
echo "Data has been submitted to $to!";
mail($to, $subject, $body);

} else {

echo "blarg!";

}
?>

```

Sorry for the messy code 😑

Help me…

Thanks

Chris::… 😃

Thanks again
