Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/12/2007, 11:09
negi
 
Fecha de Ingreso: octubre-2007
Mensajes: 65
Antigüedad: 16 años, 6 meses
Puntos: 0
Re: problema con formulario

ok... encontré un tuto en desarrollodelweb, y lo apliqué... pero siempre sale lo mismo cuando le doy enviar T.T:

aki esta el cofigo usado:
Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<html> 
<head> 
    <title>Mándanos tus comentarios</title> 
    <style type="text/css">
<!--
.Estilo1 {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 14px;
}
-->
    </style>
</head> 

<body bgcolor="#cccc66" text="#003300" link="#006060" vlink="#006060"> 
<? 
if (!$HTTP_POST_VARS){ 
?> 
<form action='".$PHP_SELF."' method='post'>
<table width="50" border="0" align="left" cellpadding="3" cellspacing="3">
  <tr>
    <th scope="col"><p class="Estilo1">&nbsp;</p>
        <p align="right" class="Estilo1">Nombre:</p>
      <p class="Estilo1">&nbsp;</p></th>
    <th scope="col"><div align="left">
      <input type = "text" name = "nombre" />
    </div></th>
  </tr>
  <tr>
    <th scope="col"><p class="Estilo1">&nbsp;</p>
        <p align="right" class="Estilo1">e-mail:</p>
        <p class="Estilo1">&nbsp;</p></th>
    <th scope="col"><div align="left">
        <input type = "text" name = "correo" />
    </div></th>
  </tr>
  <tr>
    <th scope="row"><p class="Estilo1">&nbsp;</p>
        <p align="right" class="Estilo1">C&oacute;digo de la Canci&oacute;n:</p>
      <p class="Estilo1">&nbsp;</p></th>
    <td><div align="left">
      <input type = "text" name = "codigo" />
    </div></td>
  </tr>
  <tr>
    <th scope="row"><div align="right"><span class="Estilo1">Commentarios:</span></div></th>
    <td><div align="left">
      <textarea name = "comentario" cols = 50 rows = 6> </textarea>
    </div></td>
  </tr>
  <tr>
    <th colspan="2" scope="row"><input name="submit" type="submit" value="Enviar" /></th>
  </tr>
</table>
<p>&nbsp;</p>
<p>
  <? 
}else{ 
    //Estoy recibiendo el formulario, compongo el cuerpo 
    $cuerpo = "Formulario enviado\n"; 
    $cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "\n"; 
    $cuerpo .= "Email: " . $HTTP_POST_VARS["correo"] . "\n"; 
	$cuerpo .= "Código: " . $HTTP_POST_VARS["codigo"] . "\n"; 
    $cuerpo .= "Comentarios: " . $HTTP_POST_VARS["comentario"] . "\n"; 

    //mando el correo... 
    mail("[email protected]","Formulario recibido",$cuerpo); 

    //doy las gracias por el envío 
    echo "Gracias por rellenar el formulario. Se ha enviado correctamente."; 
} 
?>
</p>
<p>&nbsp;</p>
</body> 
</html>