Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/10/2004, 02:54
Avatar de living
living
 
Fecha de Ingreso: mayo-2004
Mensajes: 1.266
Antigüedad: 19 años, 11 meses
Puntos: 2
Aquí te dejo un ejemplo muy sencillito. Después lo puedes adaptar como mejor te venga

Código HTML:
<?
function sendMail($from,$subject,$body){
	$headers = "From: $from\n";
	mail("[email protected]",$subject,$body,$headers);
	}
if (isset($_POST["enviar"])){
	$from=$_POST["from"];
	$subject=$_POST["subject"];
	$body=$_POST["body"];
	sendMail($from,$subject,$body);
	echo "Gracias por escribirnos";
}else{
?>
<HTML>
<body marginheight="0"> 
<table> 
  <form method="post" name="formContact" action="<?=$_SERVER['PHP_SELF']?>"> 
    <tr> 
      <td>Tú dirección de correo<br> 
        <input name="from" type="text" style="width:450"> 
        <br> 
        <br> 
        Asunto<br> 
        <input name="subject" type="text" style="width:450"> 
        <br> 
        <br> 
        Mensaje<br> 
        <textarea name="body" style="width:450;height:150;"></textarea> 
        <br> 
        <br> 
        <div align="center"> 
          <input type="submit" name="enviar" value="enviar"> 
        </div></td> 
    </tr> 
  </form> 
</table> 
</body>
</HTML>
<? } ?> 
__________________
¿Te apasiona el mundo del guión? El portal del guión