Código HTML:
<div class="formtext" id="apDiv3"> <form name="form1" method="post" action="mail.php"> <p align="justify">Name: <input type="text" name="name" id="name"> <br>E-Mail: <input type="text" name="email" id="email"> <br> School Name: <input type="text" name="school" id="school"> <br> I am a: <select name="iam" id="iam"> <option selected>Student</option> <option>Teacher</option> </select> <br> Country: <select name="country" id="country"> <option selected>Select a country</option> <option value="Afganistán">Afganistán </option> <option id=Albania value=Albania>Albania </select> <br> Message: <textarea name="text" id="text" cols="30" rows="8"></textarea> </p> <p align="right"> <input type="reset" name="reset form" id="reset form" value="Reset"> <input type="submit" name="send" id="send" value="Send"> </p> </form> </div>
Código PHP:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$school = $_POST['school'];
$iam = $_POST['iam'];
$country = $_POST['country'];
$text = $_POST['text'];
$message = "$name\n";
$message .= "Email: $email\n";
$message .= "School: $school\n";
$message .= "I am a: $iam\n";
$message .= "Country: $country\n";
$message .= "Message: $text\n";
$to = "aqui se encuentra mi correo pero no me permite escribirlo :'(";
$subj = "web page mail";
$head = "From: $name <$email>";
mail($to,$subj,$message,$head);
?>