Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/02/2010, 06:05
gazaposa
 
Fecha de Ingreso: noviembre-2009
Mensajes: 209
Antigüedad: 14 años, 5 meses
Puntos: 0
envío de formulario

buenas!!!a ver si me pueden ayudar.
he credo un formulario para que me llegen los datos a mi correo,pero me da error y no se pq.
les dejo el código por si me pueden decir dnde está el error.
gracias!!!!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body bgcolor="#0061AF">
<?
if (!$HTTP_POST_VARS){
?>

<div id="Layer2" style="position:absolute; left:340px; top:336px; width:104px; height:43px; z-index:2">
<form name="form11" action="envia_form_php.php" method=post>
<input type="submit" name="Submit" value="Enviar">
</form>
</div>
<div id="Layer1" style="position:absolute; left:28px; top:14px; width:261px; height:346px; z-index:1">
<table width="98%" height="103" border="0" cellpadding="3">
<tr>
<td height="66" colspan="6">
<div align="center"><strong>FORMULARIO DE INSCRIPCI&Oacute;N</strong></div></td>
</tr>
<tr>
<td width="7%" height="31" valign="top">Nombre:</td>
<td width="23%"><form name="form1" method="post" action="" >
<input type="text" name="nombre" size="25">
</form></td>
<td width="8%" valign="top">Apellidos:</td>
<td width="37%"><form name="form2" method="post" action="">
<input type="text" name="apellidos" size="35">
</form></td>
<td width="4%" valign="top">DNI:</td>
<td width="21%"><form name="form3" method="post" action="">
<input type="text" name="dni" size="21" align="right" alt="center">
</form></td>
</tr>
</table>
<table width="259%" border="0" cellpadding="3">
<tr>
<td width="9%" height="29" valign="top">Direcci&oacute;n:</td>
<td width="29%"><form name="form4" method="post" action="" >
<input type="text" name="direccion"size="35" >
</form></td>
<td width="7%" valign="top">Tel&eacute;fono:</td>
<td width="22%"><form name="form5" method="post" action="">
<input type="text" name="textfield5" size="20">
</form></td>
<td width="6%" valign="top">Email:</td>
<td width="27%"><form name="form6" method="post" action="" >
<input type="text" name="textfield6" >
</form></td>
</tr>
</table>
<table width="261%" border="0" cellpadding="3">
<tr>
<td width="23%" valign="top">Organismo/Universidad:</td>
<td width="35%"><form name="form7" method="post" action="">
<input type="text" name="organismo" size="38">
</form></td>
<td width="25%" valign="top">Tipo de participaci&oacute;n:</td>
<td width="17%"><form name="form8" method="post" action="">
<select name="participacion" size="1" >
<option>Comunicaci&oacute;n </option>
<option>P&oacute;ster </option>
<option>Oyente </option>
</select>
</form></td>
</tr>
</table>
<table width="170%" border="0" cellpadding="3">
<tr>
<td width="7%" valign="top">T&iacute;tulo:</td>
<td width="17%"><form name="form9" method="post" action="">
<input type="text" name="titulo" size="50">
</form></td>
<td width="30%" valign="top">Autores:</td>
<td width="46%"><form name="form12" method="post" action="">
<input type="text" name="autor" size="40">
</form></td>
</tr>
</table>
<table width="254%" border="0" cellpadding="3">
<tr>
<td width="23%" valign="top">Sesi&oacute;n Tem&aacute;tica:</td>
<td width="50%"><form name="form10" method="post" action="">
<input type="text" name="sesion" size="50">
</form></td>
<td width="7%" valign="top">Cuota:</td>
<td width="20%"><form name="form13" method="post" action="">
<input type="text" name="cuota" size="20">
</form></td>
</tr>
<?
}else{
//Estoy recibiendo el formulario, compongo el cuerpo
$cuerpo = "Formulario enviado\n";
$cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "\n";
$cuerpo .= "Apellidos: " . $HTTP_POST_VARS["apellidos"] . "\n";
$cuerpo .= "DNI: " . $HTTP_POST_VARS["dni"] . "\n";
$cuerpo .= "Dirección: " . $HTTP_POST_VARS["direccion"] . "\n";
$cuerpo .= "Teléfono: " . $HTTP_POST_VARS["telefono"] . "\n";
$cuerpo .= "Email: " . $HTTP_POST_VARS["email"] . "\n";
$cuerpo .= "Organismo/Universidad: " . $HTTP_POST_VARS["organismo"] . "\n";
$cuerpo .= "Participación: " . $HTTP_POST_VARS["participacion"] . "\n";
$cuerpo .= "Título: " . $HTTP_POST_VARS["titulo"] . "\n";
$cuerpo .= "Autores: " . $HTTP_POST_VARS["autor"] . "\n";
$cuerpo .= "Sesión: " . $HTTP_POST_VARS["sesion"] . "\n";
$cuerpo .= "Cuota: " . $HTTP_POST_VARS["cuota"] . "\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.";
}
?>

</table>
</div>
</body>
</html>