contacto.htm ->
Código HTML:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Formulario</title> </head> <body> </body> </html> <form method="POST" action="envia.php"> <table width="977" border="0" cellpadding="0" cellspacing="4"> <tr> <td width="234"><div align="left"><b>Nick: </b> <input name="Nick" type="text" class="formu" title="Ingrese su Nombre"id="Nombre" size="20"></div></td> <td width="179" colspan="2"> </td> </tr> <tr> <td><div align="left"><b>Edad: </b> <input name="Edad" type="text" class="formu" title="Ingrese su E-mail" id="email" size="20"></div></td> <td colspan="2"> </td> </tr> <tr> <td valign="top"><div align="left"><b>E-mail: </b> <input name="Email" type="text" class="formu" title="Ingrese un telefono de Contacto" id="fono" size="30"></div></td> <td colspan="2"> </td> </tr> <tr> <td valign="top"><div align="left"><b>¿De donde eres? <select size="1" name="D1" tabindex="19"> <option>Andalucia</option> <option>Aragon</option> <option>Asturias</option> <option>Cantabria</option> <option>Castilla la mancha</option> <option>Castilla y Leon</option> <option>Cataluña</option> <option>Ceuta</option> <option>Extremadura</option> <option>Galicia</option> <option>Islas Baleares</option> <option>Islas Canarias</option> <option>La rioja</option> <option>Madrid</option> <option>Melilla</option> <option>Murcia</option> <option>Navarra</option> <option>Pais Vasco</option> <option>Valencia</option> <option>Otros</option> </select></b></div> <div align="left"> <b>¿Cuanto tiempo empleas jugando al dod?: <input type="text" name="T4" size="50"><br> ¿Estudias o Trabajas?: <input type="checkbox" name="C1" value="ON"> Estudio. <input type="checkbox" name="C2" value="ON"> Trabajo. <br> ¿Que arma sueles utilizar?: <input type="text" name="T5" size="20"></b></div> <div align="left"> <b>¿Tu mapa favorito?: <input type="text" name="T6" size="20"> </b> </div> <div align="left"> <b>¿Tienes disponibilidad economica para ayudar al clan cle en su parte financiera?: <input type="checkbox" name="C3" value="ON">Si. <input type="checkbox" name="C4" value="ON">No.</b></div> <div align="left"> <b>¿Te sientes con dotes de mando y compromiso para jugar en equipo?: <input type="checkbox" name="C5" value="ON">Si. <input type="checkbox" name="C6" value="ON">No.</b></div></td> <td colspan="2"><br> <p> </td> </tr> <tr> <td> <div align="left"> <input type="submit" value="Enviar" name="enviar"> <input type="reset" value="Borrar" name="borrar"></div></td> <td> </td> <td> </td> </tr> </table> </form>
Código PHP:
<html>
<head>
<title>No title</title>
<meta name="generator" content="Namo WebEditor v6.0">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<dl>
<dt><?php</dt>
<dt> </dt>
<dt>//E-mail en donde se recibirá el Formulario.</dt>
<dt> </dt>
<dt>$recipiente = "adriandasilva_13@hotmail.com";</dt>
<dt> </dt>
<dt>//URL de tu Sitio Web.</dt>
<dt> </dt>
<dt>$sw = "Url de mi sitio";</dt>
<dt> </dt>
<dt>//Mensaje que te llegará al Correo, con los datos ingresados.</dt>
<dt> </dt>
<dt>$msg = "El Jugador: $Nombre, envia el formulario con los siguientes datos:nnnn</dt>
<dt> </dt>
<dt> Nick: $Nick</dt>
<dt> Edad: $Edad</dt>
<dt> E-Mail: $Email</dt>
<dt> ¿De donde eres?: $D1</dt>
<dt> ¿Cuanto tiempo empleas jugando al dod?: $T4</dt>
<dt> ¿Estudias o Trabajas?: $C1 $C2</dt>
<dt> ¿Que arma sueles utilizar?: $T5</dt>
<dt> ¿Tu mapa favorito?: $T6</dt>
<dt> ¿Tienes disponibilidad economica para ayudar al clan cle en su parte financiera?: $C3 $C4</dt>
<dt> ¿Te sientes con dotes de mando y compromiso para jugar en equipo?: $C5 $C6</dt>
<dt>//Comprobamos que los campos del formulario se encuentren completos.</dt>
<dt> </dt>
<dt>if (empty($Nick)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No ha</dt>
<dt>ingresado su Nick.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($Edad)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No ha</dt>
<dt>ingresado su Edad.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($Email)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No ha</dt>
<dt>ingresado su Email.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($D1)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has</dt>
<dt>ingresado de donde eres.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($T4)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has</dt>
<dt>ingresado cuanto tiempo empleas jugando al dod.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($C1 $C2)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has</dt>
<dt>ingresado si estudias o trabajas.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($T5)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has</dt>
<dt>ingresado que arma sueles utilizar.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($T6)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has</dt>
<dt>ingresado su cual es tu mapa favorito.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($C3 $C4)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has</dt>
<dt>ingresado si tienes disponibilidad econimica para ayudar al clancle en su parte financiera.</b></font></p>";</dt>
<dt>}</dt>
<dt>if(empty($C5 $C6)){</dt>
<dt>echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has</dt>
<dt>ingresado si te sientes con dotes de mando para jugar en equipo.</b></font></p>";</dt>
<dt>}</dt>
<dt>}else{</dt>
<dt> </dt>
<dt>//Limpiamos de posibles ataques.</dt>
<dt> </dt>
<dt>$mensaje = ereg_replace("rn","<br>", $mensaje);</dt>
<dt> </dt>
<dt>$Nick = htmlentities($Nick);</dt>
<dt>$Edad = htmlentities($Edad);</dt>
<dt>$Email = htmlentities($Email);</dt>
<dt>$D1 = htmlentities($D1);</dt>
<dt>$T4 = htmlentities($T4);</dt>
<dt>$C1 $C2 = htmlentities($C1 $C2);</dt>
<dt>$T5 = htmlentities($T5);</dt>
<dt>$T6 = htmlentities($T6);</dt>
<dt>$C3 $C4 = htmlentities($C3 $C4);</dt>
<dt>$C5 $C6 = htmlentities($C5 $C6);</dt>
<dt> </dt>
<dt>//Enviamos el E-mail con todos los datos.</dt>
<dt> </dt>
<dt>mail("$recipiente", "Contacto Web", "$msg", "FROM: $email");</dt>
<dt> </dt>
<dt>//Damos las gracias al visitante por contactarnos.</dt>
<dt> </dt>
<dt>echo"<font face=tahoma size=2></dt>
<dt><p align=center>Jugador <b>$Nick</b>.</dt>
<dt><p align=center>Gracias por rellenar el formulario para ser miembro del clan.<br></dt>
<dt></p></dt>
<dt><p align=center><br></dt>
<dt><a href=$sw>Regresar a la home</a>.</p>";</dt>
<dt>}</dt>
<dt>?></dt>
</dl>
</body>
</html>