I have a contact page and I would like to add certain options when filling out the form. Like this
<select>
<option value="media">select option</option>
<option value="music">option 1</option>
<option value="movie">option 2</option>
</select>
But I don't know how to send the option that the user has selected to my email. What do i need to do to my php file to send the value they selected? thanks.
Also, how do make it mandatory for the user to select an option?



<?php

$myemail = "";


$email = check_input($_POST['email']);
$message = check_input($_POST['message'], "Write your message");


if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
{
show_error("E-mail address not valid");
}

$message = "

E-mail: $email

Message:
$message

";


mail($myemail, $subject, $message);


header('Location: thanks.html');
exit();


function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}

function show_error($myError)
{
?>
<html>
<body>

<p>Please correct the following error: </p>
<strong><?php echo $myError; ?></strong>
<p>Hit the back button and try again</p>

</body>
</html>
<?php
exit();
}
?>