18/02/2008, 21:40
|
| | | Fecha de Ingreso: enero-2006 Ubicación: Presidencia Roque Sáenz Peña - Chaco
Mensajes: 384
Antigüedad: 18 años, 3 meses Puntos: 5 | |
Re: Validar formulario con imágenes Hola...estoy renegando con esto, con el código que me dejó Carlojas, el CAPTCHA - PHP,...y no puedo hacer que me tome el campo ['enviar'], tampoco sé si está correcto el código de la cabecera...aqui os dejo el código para que me den una manito...
Ha, y no olvido de dar las miles de gracias por ayudarme en esto!!! Código PHP: <?php if (!$enviar){ // inicio uso sesiones. session_start(); // aquí metes tu función genera_password include ("gen_codigo.php"); // llamas a la función para generar un password. $pass=genera_password(8); // lo dejamos en una variable de sesión para poderlo leer de forma segura en otro proceso.php ... $_SESSION['mipass']=$pass; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Iglesia Cristiana Carismática</title> <link href="formulario.php_files/estilosiccindex.css" rel="stylesheet" type="text/css"> <style> body { font-family:Verdana, Helvetica, sans-serif; font-size:12px; color: #FF9900; } </style></head><body> <div align="center"><img src="formulario.php_files/logoJesus.jpg" alt="LogoJesus" height="153" width="686"> </div> <table align="center" border="0"> <tbody><tr><td> <ul id="arriba"> <li><a href="http://www.icriscaris.org.ar/index.html">Inicio</a></li> <li id="arriba2"><a href="http://www.icriscaris.org.ar/nuestrotestimonio.html">Nuestro Testimonio</a></li> <li><a href="http://www.icriscaris.org.ar/doctrina.html">Doctrina</a></li> <li id="arriba2" style="border-style: none;"><a href="http://www.icriscaris.org.ar/estudiosbiblicos.html">Estudios Bíblicos</a> </li> <li id="arriba2"><a href="http://www.icriscaris.org.ar/desviaciones.html">Desviaciones Doctrinales</a> </li> <li><a href="http://www.icriscaris.org.ar/alabanzas.html">Alabanzas</a> </li> <li id="eneste"><a href="http://www.icriscaris.org.ar/formulario.php">Escríbenos</a> </li> </ul> </td> </tr> </tbody> </table> <form action="procesa.php" method="post"> <p> </p> <table align="center" border="0" cellpadding="1" cellspacing="1" height="100" width="500"><tbody><tr><td align="center"><table align="center" border="0" cellpadding="1" cellspacing="1" height="100" width="500"><tbody><tr><td align="center"><table align="center" border="0" cellpadding="1" cellspacing="1" height="100" width="500"><tbody><tr><td align="center"><table align="center" border="0" cellpadding="1" cellspacing="1" height="100" width="500"><tbody><tr><td align="center"><table align="center" border="0" cellpadding="1" cellspacing="1" height="100" width="500"> <tbody> <tr> <td align="right" width="200">Ingresa tu Nombre y Apellido:</td> <td align="left" width="293"> <input name="nombre" size="35" style="border: 1px solid rgb(255, 153, 0); font-size: 8pt; color: rgb(153, 153, 153); letter-spacing: 2px;" type="text" /> </td> </tr> <tr> <td align="right" width="200">Ingresa tu email:</td> <td align="left" width="293"> <input name="email" size="35" style="border: 1px solid rgb(255, 153, 0); font-size: 8pt; color: rgb(153, 153, 153); letter-spacing: 2px;" type="text" /> </td> </tr> </tr> <tr> <td align="right" width="200">Confirma tu email:</td> <td align="left" width="293"> <input name="confirmaemail" size="35" style="border: 1px solid rgb(255, 153, 0); font-size: 8pt; color: rgb(153, 153, 153); letter-spacing: 2px;" type="text" /> </td> </tr> <tr> <td colspan="2" align="left"> Tu mensaje: </td> </tr> <tr> <td colspan="2" align="center"> <textarea name=coment cols=70 rows=20 style="border-width: 1px; border-style: solid; font-size:8pt; border-color: #FF9900; color:#999999; letter-spacing : 1px;"/></textarea> <br /> <br /> <img src="genera_img.php" /> <br /> <br /> Ingresa el código de validación <br /> <br /> <input name="pass" style="border: 1px solid rgb(255, 153, 0); font-size: 8pt; color: rgb(153, 153, 153); letter-spacing: 2px;" type="text" /> </td> </tr> <tr> <td colspan="2" align="center"> <input name="enviar" value="Enviar" style="border: 0px solid rgb(255, 255, 255); font-size: 10pt; background-color: rgb(255, 153, 0); color: rgb(255, 255, 255); letter-spacing: 0px;" type="button" id="enviar" /> </td> </tr> </tbody> </table></td> </tr> </tbody> </table></td> </tr> </tbody> </table></td> </tr> </tbody> </table></td></tr> </tbody> </table> </form> <?php }else{ $cuerpo = "Formulario enviado\n"; $cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "\n"; $cuerpo .= "Email: " . $HTTP_POST_VARS["email"] . "\n"; $cuerpo .= "Comentarios: " . $HTTP_POST_VARS["coment"] . "\n"; mail("[email protected]","Formulario recibido de ICC",$cuerpo); if($nombre == ""){ echo "El campo “NOMBRE Y APELLIDO“ no es correcto."; } if($email !== $confirmaemail){ echo "Su dirección correo electrónico no es correcto."; } if($consulta==""){ echo"El campo de “CONSULTA“ no ha sido rellenado."; } if (@mail("[email protected]","Nuevo mensaje recibido",$cuerpo) ){ echo "<table width='100%' border='0' align='center' >"; echo "<tr><td align='center'> El formulario ha sido enviado exitosamente.</td></tr></table>"; } else{ echo "<table width='100%' border='0' align='center' >"; echo "<tr><td align='center'> El formulario no ha sido enviado.<br /> Inténtelo más tarde.</td></tr></table>"; } } ?> <table align="center" border="0">.......etc....etc....</html> |