Foros del Web » Programando para Internet » PHP »

Formulario e-mail

Estas en el tema de Formulario e-mail en el foro de PHP en Foros del Web. Hola. Tengo el siguiente codigo y no envia todos los campos del formulario. Solo manda algunos. Codigo de apuestas.html: -------------------------------- <FORM method=GET action="http://usuarios.lycos.es/alaporra/mandarmailoscars.php"> <div align="left"> ...
  #1 (permalink)  
Antiguo 29/01/2004, 08:21
 
Fecha de Ingreso: octubre-2003
Mensajes: 280
Antigüedad: 20 años, 5 meses
Puntos: 1
Formulario e-mail

Hola. Tengo el siguiente codigo y no envia todos los campos del formulario. Solo manda algunos.

Codigo de apuestas.html:
--------------------------------

<FORM method=GET action="http://usuarios.lycos.es/alaporra/mandarmailoscars.php">
<div align="left">
<TABLE width="99%">
<TBODY>
<TR bgcolor="#cccccc">
<TD width="57%" height="37" align=right> <div align="left"><font color="#000000" size="1">Introduce
tu nombre</font></div></TD>
<TD width="43%"><div align="center"><font color="#000000" size="1"><strong>
<INPUT maxLength=50 name=nombre>
</strong></font></div></TD>
</TR>
<TR>
<TD width="57%" height="38" align=right> <div align="left"><font color="#000000" size="1">Introduce
tu ciudad</font></div></TD>
<TD width="43%"><div align="center"><font color="#000000" size="1"><strong>
<SELECT size=1 name=ciudad>
<OPTION selected>Selecciona tu ciudad</OPTION>
<OPTION>---------------------------</OPTION>
<OPTION>A Coruña</OPTION>
<OPTION>Alava</OPTION>
<OPTION>Albacete</OPTION>
<OPTION>Alicante</OPTION>
<OPTION>Almeria</OPTION>
<OPTION>Asturias</OPTION>
<OPTION>Ávila</OPTION>
<OPTION>Badajoz</OPTION>
<OPTION>Baleares</OPTION>
<OPTION>Barcelona</OPTION>
<OPTION>Burgos</OPTION>
<OPTION>Cáceres</OPTION>
<OPTION>Cádiz</OPTION>
<OPTION>Cantabria</OPTION>
<OPTION>Castellón</OPTION>
<OPTION>Ceuta</OPTION>
<OPTION>Ciudad Real</OPTION>
<OPTION>Córdoba</OPTION>
<OPTION>Cuenca</OPTION>
<OPTION>Granada</OPTION>
<OPTION>Guadalajara</OPTION>
<OPTION>Huelva</OPTION>
<OPTION>Jaen</OPTION>
<OPTION>La Rioja</OPTION>
<OPTION>Las Palmas</OPTION>
<OPTION>León</OPTION>
<OPTION>Lleida</OPTION>
<OPTION>Lugo</OPTION>
<OPTION>Madrid</OPTION>
<OPTION>Málaga</OPTION>
<OPTION>Murcia</OPTION>
<OPTION>Navarra</OPTION>
<OPTION>Ourense</OPTION>
<OPTION>Palencia</OPTION>
<OPTION>Pontevedra</OPTION>
<OPTION>Salamanca</OPTION>
<OPTION>Segovia</OPTION>
<OPTION>Sevilla</OPTION>
<OPTION>Tarragona</OPTION>
<OPTION>Tenerife</OPTION>
<OPTION>Toledo</OPTION>
<OPTION>Valencia</OPTION>
<OPTION>Valladolid</OPTION>
<OPTION>Zamora</OPTION>
<OPTION>Zaragoza</OPTION>
<OPTION>Fuera de España</OPTION>
</SELECT>
</strong></font></div></TD>
</TR>
<TR bgcolor="#cccccc">
<TD width="57%" height="35" align=right> <div align="left"><font color="#000000" size="1">PEL&Iacute;CULA</font></div></TD>
<TD width="43%"><div align="center"><font color="#000000" size="1"><strong>
<SELECT size=1 name=pelicula>
<OPTION selected>El Retorno del Rey</OPTION>
<OPTION>Lost in Translation</OPTION>
<OPTION>Master and Commander</OPTION>
<OPTION>Mystic River</OPTION>
<OPTION>Seabiscuit</OPTION>
</SELECT>
</strong></font></div></TD>
</TR>
<TR>
<TD width="57%" height="34" align=right> <div align="left"><font color="#000000" size="1">DIRECTOR</font></div></TD>
<TD width="43%"><div align="center"><font color="#000000" size="1"><strong>
<SELECT size=1 name=direccion>
<OPTION selected>Fernando Merielles - Ciudad de Dios</OPTION>
<OPTION>Peter Jackson - El Retorno del Rey</OPTION>
<OPTION>Soffia Coppola - Lost in Translation</OPTION>
<OPTION>Peter Weir - Master and Commander</OPTION>
<OPTION>Clint Eastwood - Mystic River</OPTION>
</SELECT>
</strong></font></div></TD>
</TR>
<TR bgcolor="#cccccc">
<TD width="57%" height="32" align=right> <div align="left"><font color="#000000" size="1">ACTOR</font></div></TD>
<TD width="43%"><div align="center"><font color="#000000" size="1"><strong>
<SELECT size=1 name=actor>
<OPTION selected>Johnny Depp - Piratas del Caribe</OPTION>
<OPTION>Ben Kingsley - Casas de Arena y ...</OPTION>
<OPTION>Jude Law - Cold Mountain</OPTION>
<OPTION>Bill Murray - Lost in Translation</OPTION>
<OPTION>Sean Penn - Mystic River</OPTION>
</SELECT>
</strong></font></div></TD>
</TR>

.......
<TD height="26" colSpan=2 align=middle><div align="center"><font color="#000000" size="1"><strong>
<INPUT type=image src="./peliculas/enviar.gif" value=Enviar name=enviar>

<INPUT type=image src="./peliculas/borrar.gif" value=Borrar name=borrar onclick="reset();return false"
>
</strong></font></div></TD>
</TR>
<TR> </TR>
</TBODY>
</TABLE>
</div>
</FORM>

Código mandarmailoscars.php:
---------------------------------------

<?php
$destinatario = "[email protected]";
$asunto = "Oscars 2003";
$cuerpo ="

<br> NOMBRE: $nombre
<br> CIUDAD : $ciudad
<br> PELICULA : $pelicula
<br> DIRECTOR : $direccion
<br> ACTOR : $actor
<br> ACTRIZ : $actriz
<br> ACTOR DE REPARTO : $actor2
<br> ACTRIZ DE REPARTO : $actriz2
.....
";

mail($destinatario,$asunto,$cuerpo);
header("location:./redireccion.html");

?>
  #2 (permalink)  
Antiguo 29/01/2004, 08:28
Ex Colaborador
 
Fecha de Ingreso: junio-2002
Mensajes: 9.091
Antigüedad: 21 años, 9 meses
Puntos: 16
Hola,

¿Podrias decir que campos/valores no se envian? ¿No sera que no se envian cuando los valores tienen un espacio?

Quizas el problema es que tu codigo HTML no es valido. Pon comillas a los atributos de las etiquetas, y pon atributo value a los option.

Suerte.

PD: Tambien te recomiendo que uses el metodo POST para el formulario.
__________________
Josemi

Aprendiz de mucho, maestro de poco.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:52.