Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/08/2011, 09:17
Avatar de diepdraco
diepdraco
 
Fecha de Ingreso: marzo-2005
Mensajes: 165
Antigüedad: 19 años, 1 mes
Puntos: 0
Pregunta Simple Formulario

Tengo un formulario que envie un mensaje a tu mail, funciona muy bien, pero el problema es que me pidieron un lista con varias opciones y no la esta cachando

Formulario

<form action="mailer.php" method="post" name="form1" id="form1">
<table width="400" border="0" align="center">
<tr>
<td width="84" align="left" class="texto_cont"><span class="text2">Nombre</span>: </td>
<td width="306"><input name="Nombre" type="text" class="text_gris12" size="40" />
</td>
</tr>
<tr>
<td align="left" class="texto_cont"><span class="text2">Tel&eacute;fono</span>: </td>
<td><input name="Telefono" type="text" class="text_gris12" size="40" maxlength="8" /></td>
</tr>
<tr>
<td align="left" class="text2">E-mail:</td>
<td><input name="Correo" type="text" class="text_gris12" size="40" /></td>
</tr>
<tr>
<td align="left" class="text2">Ciudad:</td>
<td><input name="Ciudad" type="text" class="text_gris12" size="40" /></td>
</tr>
<tr>
<td align="left" class="text2">Direcci&oacute;n: </td>
<td><input name="Domicilio" type="text" class="text_gris12" size="40" /></td>
</tr>
<tr>
<td align="left" valign="top" class="text2">Depto</td>
<td><label>
<select name="Depto" id="Depto">
<option>Financieros</option>
<option>Ventas</option>
<option>Almacen</option>
</select>
</label></td>
</tr>
<tr>
<td align="left" valign="top" class="text2">Comentario</td>
<td><textarea name="Mensaje" cols="40" class="text_gris12"></textarea></td>
</tr>
<tr>
<td valign="top" class="text_azul11bold">&nbsp;</td>
<td align="center"><input name="submit" type="submit" class="text_gris11_center" value="Enviar" /></td>
</tr>
</table>
</form>


Y este es el mailer.php que recibe los datos y los envia al mail

<?php
if(isset($_POST['submit'])) {
$to = "[email protected]\n";
$subject = "Reservaciones";
$Nombre_field = $_POST['Nombre'];
$Telefono_field = $_POST['Telefono'];
$Domicilio_field = $_POST['Domicilio'];
$Ciudad_field = $_POST['Ciudad'];
$Correo_field = $_POST['Correo'];
$Correo_field = $_POST['Depto'];
$Mensaje = $_POST['Mensaje'];
$body = "
Nombre: $Nombre_field\n
Telefono: $Telefono_field\n
Correo: $Correo_field\n
Ciudad: $Ciudad_field\n
Domicilio: $Domicilio_field\n
Depto: $Depto_field\n
Mensaje:\n $Mensaje";
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>

Que estoy haciendo mal!?
__________________
No por siempre llovera