20/10/2003, 18:19
|
| | | Fecha de Ingreso: julio-2003
Mensajes: 1.356
Antigüedad: 20 años, 10 meses Puntos: 2 | |
Formulario.php Bueno el codigo que tenia anterior era muy largo, mejor uso este pero ahora funciona y sale el mensaje de formulario enviado exitosamente, pero al correo no llega nada.
formulario.php Código PHP: <HTML><HEAD><TITLE>Form</TITLE> </HEAD> <BODY vLink=#FFFFFF aLink=#FFFFFF link=#FFFFFF bgColor=#ffffff topMargin=0> <? if (!$HTTP_POST_VARS){ ?> <div align="left"> <FORM METHOD="post" ACTION="formulario.php"> <table width="487" border="0" bgcolor="#CCCCFF"> <tr> <td width="56" height="16"><span lang=ES style='font-family:Arial;mso-ansi-language: ES'><font size="1">Nombre del Cliente</font><span style='mso-spacerun:yes'></span></span></td> <td width="131" height="16"> <input type="text" name="nombre"> </td> <td width="187" height="16"> <select name="mes"> <option value="Enero">Enero</option> <option value="Febrero">Febrero</option> <option value="Marzo">Marzo</option> <option value="Abril">Abril</option> </select> <select name="dia"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </td> <td width="95" height="16"> <select name="anio"> <option value="2003">2003</option> <option value="2004">2004</option> </select> </td> </tr> <tr> <td width="56"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Tel/Fax:</font></td> <td width="131"> <input type="text" name="telfax"> </td> <td width="187"> <input type="text" name="telfax2"> </td> <td width="95"> </td> </tr> <tr> <td width="56" height="21"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Dirección:</font></td> <td width="131" height="21"> <input type="text" name="direccion"> </td> <td width="187" height="21"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> Email: <input type="text" name="email"> </font></td> <td width="95" height="21"> </td> </tr> <tr> <td width="56"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nombre de la Producción</font></td> <td width="131"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> <input type="text" name="nomproduccion"> </font></td> <td width="187"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> #Unidades <input type="text" name="unidades"> </font></td> <td width="95"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">#Bulk <select name="bulk"> <option value="0">0</option> <option value="100">100</option> <option value="150">150</option> </select> </font></td> </tr> <tr> <td width="56"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Empaque</font></td> <td width="131"> <select name="empaque"> <option value="Finished">Finished</option> <option value="Q-Packs">Q-Packs</option> <option value="Digipack">Digipack</option> </select> </td> <td width="187"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">#Discos <input type="text" name="discos"> </font></td> <td width="95"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Colores: <select name="colores"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </font></td> </tr> <tr> <td width="56"> </td> <td width="131"> </td> <td width="187"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"># Paneles Caratula <select name="paneles"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </font></td> <td width="95"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Colores: <select name="colores2"> <option value="1">1</option> <option value="2">2</option> </select> </font></td> </tr> <tr> <td width="56"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Bar Code</font></td> <td width="131"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> <input type="text" name="barcode"> </font></td> <td width="187"> </td> <td width="95"> </td> </tr> <tr> <td width="56"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Iniciales</font></td> <td width="131"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> <input type="text" name="iniciales"> </font></td> <td width="187"> </td> <td width="95"> </td> </tr> <tr> <td width="56"> </td> <td width="131"> </td> <td width="187"> </td> <td width="95"> </td> </tr> <tr> <td width="56"> </td> <td width="131"> </td> <td width="187"> <input type="submit" name="enviar" value="Submit"> <input type="reset" name="reset" value="Reset"> </td> <td width="95"> </td> </tr> </table></form> <? }else{ //Estoy recibiendo el formulario, compongo el cuerpo $cuerpo = "Formulario enviado\n"; $cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "\n"; $cuerpo .= "Mes: " . $HTTP_POST_VARS["mes"] . "\n"; $cuerpo .= "Dia: " . $HTTP_POST_VARS["dia"] . "\n"; $cuerpo .= "Año: " . $HTTP_POST_VARS["anio"] . "\n"; $cuerpo .= "Telefax: " . $HTTP_POST_VARS["telfax"] . "\n"; $cuerpo .= "Telefax2: " . $HTTP_POST_VARS["telfax2"] . "\n"; $cuerpo .= "Direccion: " . $HTTP_POST_VARS["direccion"] . "\n"; $cuerpo .= "Email: " . $HTTP_POST_VARS["email"] . "\n"; $cuerpo .= "Nombre de la Produccion: " . $HTTP_POST_VARS["nomproduccion"] . "\n"; $cuerpo .= "Unidades: " . $HTTP_POST_VARS["unidades"] . "\n"; $cuerpo .= "Bulk: " . $HTTP_POST_VARS["bulk"] . "\n"; $cuerpo .= "Empaque: " . $HTTP_POST_VARS["empaque"] . "\n"; $cuerpo .= "Discos: " . $HTTP_POST_VARS["discos"] . "\n"; $cuerpo .= "Colores: " . $HTTP_POST_VARS["colores"] . "\n"; $cuerpo .= "Paneles: " . $HTTP_POST_VARS["paneles"] . "\n"; $cuerpo .= "Colores2: " . $HTTP_POST_VARS["colores2"] . "\n"; $cuerpo .= "Bar Code: " . $HTTP_POST_VARS["barcode"] . "\n"; $cuerpo .= "Iniciales: " . $HTTP_POST_VARS["iniciales"] . "\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."; } ?> </BODY></HTML>
__________________ Solo por Hoy: Trataré de fortalecer mi mente. Estudiaré y aprenderé algo útil Hoteldipity Arte Caracol |