Created
October 17, 2013 18:08
-
-
Save ricardosiri68/7029537 to your computer and use it in GitHub Desktop.
otro que no puede enviar un e-mail con PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form class="form" action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="text/plain"> | |
<label for="name" accesskey="n" tabindex="1">Nombre</label> | |
<input type="text" id="name" name="name" value="" /> | |
<label for="email" accesskey="e" tabindex="2">E-Mail</label> | |
<input type="text" id="email" name="email" value=""/> | |
<label for="website" accesskey="w" tabindex="3">Sitio Web</label> | |
<input type="text" id="website" name="website" value=""/> | |
<label for="mensaje" accesskey="m" tabindex="4">Mensaje</label> | |
<textarea name="mensaje" id="mensaje" rows="10" cols="10"></textarea> | |
<div style="clear:both"></div> | |
<button type="submit" class="btn">Enviar</button> | |
</form> | |
<?php | |
if (isset($_POST['email'])) { | |
$mensaje="Mensaje del formulario de contacto"; | |
$mensaje.= "nNombre: ". $_POST['name']; | |
$mensaje.= "nEmail: ".$_POST['email']; | |
$mensaje.= "nWebSite: ". $_POST['website']; | |
$mensaje.= "nMensaje: n".$_POST['mensaje']; | |
$destino= "[email protected]"; | |
$remitente = $_POST['email']; | |
$asunto = "Mensaje enviado por: ".$_POST['nombre']; | |
mail($destino,$asunto,$mensaje,"FROM: $remitente"); | |
?> | |
<p><strong>Mensaje enviado.</strong></p> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment