Foros del Web » Programando para Internet » PHP »

Urgente!! Formulario

Estas en el tema de Urgente!! Formulario en el foro de PHP en Foros del Web. TENGO EL SIGUIENTE PROBLEMA: SO SE COMO PARA LOS DATOS DE LAS CASILLAS DE VERIFICACION LISTA Y MENU. ACA LES DEJO ARCHIVO PHP. PARA QUE ...
  #1 (permalink)  
Antiguo 19/12/2007, 07:54
 
Fecha de Ingreso: noviembre-2007
Ubicación: san justo - santa fe
Mensajes: 31
Antigüedad: 16 años, 5 meses
Puntos: 0
Urgente!! Formulario

TENGO EL SIGUIENTE PROBLEMA:
SO SE COMO PARA LOS DATOS DE LAS CASILLAS DE VERIFICACION LISTA Y MENU.
ACA LES DEJO ARCHIVO PHP. PARA QUE LO VEAN Y ME DIGAN COMO TENGO QUE HACER PARA QUE EL FORMULARIO ME MUESTRE LO QUE USUARIO A ELEGIDO.
EL CODIGO:

<?
if (!$HTTP_POST_VARS){
?>
</p>
<body background="file:///G|/PIERONI/a/fondo/fondosanel2%20copia.jpg">
<form name="enviar" action="contact.php" method="post">
<div align="center"> <br>

<table width="54%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">Ingrese sus datos:</td>
</tr>
<tr>
<td colspan="2"><img src="imagenes/spacer.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="40%">Apellido:</td>
<td width="60%"><input type=text name="apellido" class="t_n" size=35></td>
</tr>
<tr>
<td><img src="archivos_index/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td width="40%">Nombre:</td>
<td width="60%"><input type=text name="nombre" class="t_n" size=35></td>
</tr>
<tr>
<td><img src="archivos_index/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td>Direccion:</td>
<td><input type="text" name="direccion" class="t_n" size="35"></td>
</tr>
<tr>
<td colspan="2"><img src="imagenes/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td>Teléfono:</td>
<td><input type="text" class="t_n" size="5" maxlength="5" name="textfield">
<input type="text" name="telefono" class="t_n" maxlength="12" size="16"></td>
</tr>
<tr>
<td colspan="2"><img src="imagenes/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td>E-mail:</td>
<td><input type="text" class="t_n" size="25" name="mail"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><img src="archivos_index/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td height="125" valign="top">Comentaios:</td>
<td><textarea name="comentario" cols="32" rows="6"></textarea></td>
</tr>
</table>
<TABLE cellspacing = "4">
<tr>
<LABEL FOR="ofertas">
<BR><INPUT TYPE="checkbox" NAME="info[]" VALUE="información Ofertas" ID="ofertas"CHECKED>Deseo recibir información sobre sus ofertas<BR>
</LABEL>

<LABEL FOR="Novedades">
<INPUT TYPE="checkbox" NAME="info[]" VALUE="información Novedades" ID="Novedades">Deseo recibir información sobre las últimas novedades<BR>
</LABEL>

<LABEL FOR="Servicios">

<INPUT TYPE="checkbox" NAME="info[]" VALUE="información otros Servicios" ID="Servicios">Deseo recibir información sobre otro de sus servicios<BR><BR>
</LABEL>



<TR>
<TD VALIGN="top" WIDTH ="200">¿Cómo desea que<BR>contactemos con usted ?<BR>

<SELECT NAME="Contacto">

<OPTION VALUE="Teléfono"SELECTED>Por teléfono</OPTION>
<OPTION VALUE="E-mail">Por correo electrónico</OPTION>
<OPTION VALUE="Correo Postal">Por correo postal</OPTION>
<OPTION VALUE="Visita a Domicilio">Visitando su domicilio</OPTION>
</TD>

<TD VALIGN="top" WIDTH="200"><BR>Productos de interés :<BR>

<SELECT NAME="Productos"MULTIPLE SIZE = 4>
<OPTION VALUE="linachem" SELECTED>Lina Chem</OPTION>
<OPTION VALUE="mascardi">Mascardi</OPTION>
<OPTION VALUE="fury" >Fury</OPTION>
<OPTION VALUE="crossman">Crossman</OPTION>
<OPTION VALUE="bta">Bta</OPTION>
<OPTION VALUE="dowenpagio" >Dowen Pagio</OPTION>
<OPTION VALUE="black&decker">Black & Decker </OPTION>
<OPTION VALUE="dewalt" >DeWalt</OPTION>
<OPTION VALUE="motat" >Mota</OPTION>
</TD>
<TD>Para seleccionar más de <BR>una opción tenga presionado Ctrl<BR>
</TD>
</TR>
</tr>
</TABLE>
<img src="imagenes/spacer.gif" width="8" height="8"><br>
complete todos los campos <br>
<input name="submit" type=submit value="Enviar">&nbsp;
<input name="reset" type="reset" class="t_n" value="Borrar">
<br>
</form>
<?
}else{


//texto ordenado de como lo recibiremos

$cuerpo = "<h1>Información del formulario que se envio desde Sanel distribuidora</h1>". "<br>\n". "<br>\n";
$cuerpo .= "Apellido: " . $HTTP_POST_VARS["apellido"] . "<br>\n";
$cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "<br>\n";
$cuerpo .= "Dirección: " . $HTTP_POST_VARS["direccion"] . "<br>\n";
$cuerpo .= "Teléfono: " . $HTTP_POST_VARS["telefono"] . "<br>\n";
$cuerpo .= "Email: " . $HTTP_POST_VARS["mail"] . "<br>\n";
$cuerpo .= "Comentario: " . $HTTP_POST_VARS["comentario"] . "<br>\n";
//HASTA ACA TODO BIEN

$cuerpo .= "infor: . $HTTP_POST_VARS["info"] ."<br>\n";
//$cuerpo .= "Información de Productos: " . $_POST["Productos"] . "<br>\n";
$cuerpo .= "Tipo de Contacto: " . $_POST["Contacto"] . "<br>\n";
if (is_array($_POST['Productos'])) {
foreach($_POST['Productos'] as $c)
{
$cuerpo .= "narca".$c;
}
}


// $ofertas, $novedades, $servicios."<br>\n";

//donde se mandara y asunto con el que lo recibiremos
//mail("[email protected]","Formulario recibido de tudominio.com",$cuerpo);

//agradecimiento
echo $cuerpo;
echo "<br>";

echo "El envio se realizo con exito, en breve nos pondremos en contacto con usted, gracias.. ";
}
echo "<br><br>";
echo "<div align='center'><input type='button' class='t_n' value='Back' onclick='window.history.back()'></div>";
?>
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 22:57.