I am currently trying to make a small world cup pool for a few friends of mine, and I want to create a simple PHP form with drop down boxes to select the games for ease of access.
I want the form to have a field for Name, and then a drop down for each game.
I was trying to edit a stock contact form I found online - but it has more PHP than I know what to do with, and I cannot seem to find one specifically with drop down menus only.
I know the HTML/CSS Side of things, but cannot figure out how to make it submit the form content to my email.
Could anyone point me in the right direction, or provide me a template to work with?
THANKS!
EDIT:
Awesome, thanks @David Corbin & @Cody (http://www.kirupa.com/web/php_contact_form3.htm)
I've got it too work, appreciate everyone's help so far and Ill post it when I got it working.
PHP (mailer2.php)
$to = "email@email.com";
$subject = "World Cup Challenge";
$name_field = $_POST['name'];
$email= $_POST['email'];
$match_name= $_POST['match_name'];
$check_msg ="";
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value\n";
}
$body = "Match: $match_name\n $check_msg";
$body = "From: $name_field - ($email) \n $check_msg";
mail($to, $subject, $body);
echo "Data has been submitted to $to!";
} else {
echo "blarg!";
}
?>
HTML
<head>
<title>World Cup Challenge</title>
<style>
BODY{color:#000000; font-size: 8pt; font-family: Verdana}
.button {background-color: rgb(128,128,128); color:#ffffff; font-size: 8pt;}
.inputc {font-size: 8pt;}
.style3 {font-size: xx-small}
</style>
</head>
<form method="POST" action="mailer2.php">
Name:
<input type="text" name="name" size=""><br>
<br>
<input type="text" name="email" size=""><br>
<br>
Brazil VS Cameroon
<input type="hidden" name="match_name" value="Brazil VS Cameroon">
<br>
<input type="checkbox" name="check[]" value="Brazil"> Brazil<br>
<input type="checkbox" name="check[]" value="Cameroon"> Cameroon<br>
<br>
<input type="submit" value="Submit" name="submit">
</form>
It submits to me the value, but how can I also make it submit to me the name of the Matchup? (eg. Brazil VS Cameroon)
Thanks!