Aqui os pongo el codigo que llevo de momento:
Código HTML:
<head> <title>Documento sin título</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <form method="post" action="enviar.php"> <p> <input name="nombre" type="text" value="Nombre"> <br> <input name="email" type="text" value="E-mail"><br> <input name="asunto" type="text" value="Asunto" /> </p> <p> <textarea name="mensaje"></textarea> </p> <p> <input type="submit" name="Submit" value="Enviar"> <input type="reset" name="Submit2" value="Borrar" /> </p> </form> </body> </html>
Código PHP:
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
$admin = "[email protected]";
$datos = "El usuario se llama $_POST[nombre] y su mail es $_POST[email] y el asunto es $_POST[asunto]";
$mensaje = "Este es el mensaje de texto: $_POST[mensaje]";
mail($admin,"Datos usuario",$datos ,$mensaje);
?>
</body>
</html>