_________________________________________________
archivo index.html
Rellene los datos para inscribirse en el
Certamen de Pintura Rápida
Código PHP:
<form action="enviar.php" method="post" enctype="application/x-www-form-urlencoded" name="form1" class="Estilo12" onSubmit="MM_validateForm('nombre','','R','telefon o','','RisNum','email','','NisEmail','lugar de reparto','','R');return document.MM_returnValue">
</b></i></u></font>
<p><font color="#000080"><b>Nombre*: </b>
</font>
<label>
<font color="#000080">
<input name="nombre" id="nombre" size="50" style="font-weight: 700"><b>
</b></font>
</label></p>
<p><font color="#000080"><b> Apellidos*:
</b></font>
<label>
<font color="#000080">
<input name="nombre1" id="nombre1" size="50" style="font-weight: 700"><b>
</b></font>
</label></p>
<p><font color="#000080"><b>Dirección*:
</b></font>
<label>
<font color="#000080">
<input name="nombre2" id="nombre2" size="50" style="font-weight: 700"><b>
</b></font>
</label></p>
<p><font color="#000080"><b>Localidad*: </b>
</font>
<label>
<font color="#000080">
<input name="nombre0" id="nombre0" size="50" style="font-weight: 700"><b>
</b></font>
</label>
<font color="#000080">
<b>
<br>
C. P. *: </b>
</font>
<label>
<font color="#000080">
<input name="telefono" id="telefono" size="10" maxlength="9" style="font-weight: 700"><b>
</b></font>
</label>
<font color="#000080"><b>Provincia*:
</b></font>
<label>
<font color="#000080">
<input name="telefono0" id="telefono0" size="10" maxlength="9" style="font-weight: 700"><b>
</b></font>
</label></p>
<p><font color="#000080"><b>Teléfono*: </b>
</font>
<label>
<font color="#000080">
<input name="telefono1" id="telefono1" size="19" maxlength="9" style="font-weight: 700"><b>
</b></font>
</label>
<font color="#000080">
<b>
<br>
<br>
Email*: </b>
</font>
<label>
<font color="#000080">
<input name="email" id="email" size="53" style="font-weight: 700"><b>
</b></font>
</label>
<font color="#000080">
<b>
<br>
<br>
Como nos conociste: </b>
</font>
<label>
<font color="#000080">
<select name="interesado" id="interesado" style="font-weight: 700">
<option>Castellariegos.com</option>
<option>Por anteriores certámenes</option>
<option>Un amigo</option>
<option>A través de un email</option>
<option>Por carteles y trípticos</option>
<option>Otros</option>
</select><b> </b></font>
</label>
</p>
<p>
<font color="#000080"><b>Has participado en anteriores certámenes? En
cuales?<br>
<br>
</b></font>
<label>
<font color="#000080">
<textarea name="lugar de reparto" cols="35" rows="4" id="lugar de reparto" style="font-weight: 700"></textarea><b>
</b></font>
</label>
<font color="#000080">
<b>
<br>
<br>
Observaciones, dudas y sugerencias <br>
</b>
</font>
<label>
<font color="#000080">
<textarea name="observaciones" id="observaciones" cols="35" rows="8" style="font-weight: 700"></textarea><b>
</b></font>
</label>
<b><font color="#000080">
<br>
<br>
</font></b><span class="Estilo15"><font color="#000080"><b>
<span class="Estilo16">Los campos marcados con * son obligatorios.
Lee la política de PROTECCIÓN DE DATOS</span></b></font></span></p>
<p>
<span class="Estilo15"><label>
<font color="#000080">
<input type="submit" name="enviar" id="enviar" value="Enviar" style="font-weight: 700"><b>
</b></font>
</label>
</span>
<label>
<font color="#000080">
<input type="submit" name="restablecer" id="restablecer" value="Restablecer" style="font-weight: 700"><b>
</b></font>
</label>
<font color="#000080">
<br>
</font>
</p>
</form>
</body>
_________________________________________________
Archivo enviar.php
<?php
$email=$_POST["email"];
$cuerpo="Nombre: " .$_POST["nombre"]."\n\r".
"Apellidos: " .$_POST["apellidos"]."\n\r".
"Dirección: " .$_POST["dirección"]."\n\r".
"Localidad: " .$_POST["localidad"]."\n\r".
"CPostal: " .$_POST["cpostal"]."\n\r".
"Provincia: " .$_POST["provincia"]."\n\r".
"Teléfono: " .$_POST["teléfono"]."\n\r".
"Email: " .$_POST["email"]."\n\r".
"Como nos conociste: " .$_POST["comonoshasconocido"]."\n\r".
"Has participado en anteriores certámenes? En cuales?: " .$_POST["antparticipaciones"]."\n\r".
"Observaciones dudas y sugerencias: " .$_POST["observaciones"];
mail("[email protected]", "Inscripción Pintura", $cuerpo, "From:$email");
echo "<b><center>Formulario enviado correctamente, contactaremos con usted con la mayor brevedad posible.</center></b>";
?>