i am creating an online form that submits data to me via email using a php file. Everything works fine when I submit "text" inputs (<input type="text" name="myname" />) but I get my error page when I try to include "select" boxes.
In my code I have: (for example)
<form method="post" action="contact.php">
...
<select name="year">
<option>2004</option>
<option>2005</option>
</select>
In my php file I have:
$year = $_POST['year'] ;
...
$messageproper =
...
"\n\nYear: " . $year . "
The idea is that it should tell me what year was selected in the email I recieve. What am I doing wrong?
In my code I have: (for example)
<form method="post" action="contact.php">
...
<select name="year">
<option>2004</option>
<option>2005</option>
</select>
In my php file I have:
$year = $_POST['year'] ;
...
$messageproper =
...
"\n\nYear: " . $year . "
The idea is that it should tell me what year was selected in the email I recieve. What am I doing wrong?