Cita:
Código HTML:
<form action="envio.php" method="post"> Asunto del mensaje: <select name="asunto"> <option value="sin_asunto">-- Elige un asunto --</option> <option value="afiliar">Afiliacion</option> <option value="sugerencia">Sugerencia</option> <option value="aporte">Denuncia</option> <option value="otro">Otro</option> </select> <br/><br/>Tu dirección email: <input name="remite" type="textbox"/> <br/><br/> <textarea name="texto" style="width:300px;height:230px;"></textarea> <br /><br /><input value="Enviar" type="submit"/> </form>
php
Código HTML:
<?php
$asunto = $_POST['asunto'];
$texto = $_POST['texto'];
$remite = $_POST['remite'];
$to = "[email protected]";
$header = "From: $remite";
if ($asunto=="sin_asunto" || $texto=="" || $remite=="")
echo "Rellena los datos requeridos correctamente. <a href='formulario.html'>Volver</a>";
else
{
mail($to,$asunto,$texto,$header);
echo "Mensaje enviado. <a href='index.html'>Regresar a MI WEB</a>";
}
?>
![Adios](http://static.forosdelweb.com/fdwtheme/images/smilies/adios.gif)