Hello PHP gurus
I'm new to PHP and I just recently registered a website that I am going to be designing
with a form in it.
The host server that I registered with has a CGI-BIN , PHP, MySQL capability.
My problem is that I am trying to get the information from my simple HTML form emailed to my account as a text message and also it will also tell me which email address it came from.
This is my HTML code for my form :
<form method="post" action="../sendmail.php">
Email:
<input name="email" type="text" /><br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea><br />
<h2>Select Your Car</h2>
<p>Type:<br />
<select name="selType">
<option value="Porsche 911">Porshe 911</option>
<option value="Volkswagen Beetle">Volkswagen Beetle</option>
<option value="Ford Taurus">Ford Taurus</option>
</select>
</p>
<p>Color:<br />
<select name="selColor">
<option value="blue">blue</option>
<option value="yellow">yellow</option>
<option value="red">red</option>
</select>
</p>
<p/>
<input type="submit" />
</form>
Now for my PHP file, I've got only the email address to display who its from in my email but I can't seem to get the information from the dropdown to display in my email. Here is the PHP code:
<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$type = $_POST['selType'];
$color=$_POST['selColor'];
mail( "name@mydomain.com", "Feedback Form Results",
$message,"From:$email");
header( "Location: http://www.mydomain.com/thankyou.html" );
?>
Please help if you can. I appreciate you time on this.
Thanks in advance
