htm
mailer.php
Código (html4strict) [Seleccionar]
<form id="form2" action="mailer.php" method="POST" target="mainFrame" >
<tr>
<td width="64" height="28">Nombre : </td><br />
<td width="472"><span id="sprytextfield1">
<input type="text" name="Nombre" id="Nombre" />
<span class="textfieldRequiredMsg">es obligatorio</span></span></td>
</tr>
<br />
<tr>
<td width="64" height="28">E-mail: </td><br />
<td width="472"><span id="sprytextfield2">
<input type="text" name="E-mail" id="E-mail" />
<span class="textfieldRequiredMsg">es obligatorio</span><span class="textfieldInvalidFormatMsg">Formato no valido.</span></span></td>
</tr>
<br /><br />
<tr>
<td height="28">Mensage:</td><br />
<td height="113" colspan="2"><span id="sprytextarea1">
<textarea name="Mensage" id="Mensage" cols="45" rows="5"></textarea>
<span class="textareaRequiredMsg">es obligatorio</span><br />
<span class="textareaMaxCharsMsg">Hasta 800 caracteres.</span></span></td>
</tr>
<tr>
<td colspan="2" height="28">
<br />
<br />
<label>
<input type="reset" name="Borrar" id="Borrar" value="Borrar" />
</label>
<label><input type="submit" value="Enviar" name="enviar" id="enviar" />
</label>
</td>
</tr>
</form>
mailer.php
Código (php) [Seleccionar]
<?php
$to = "info@alllimos.eu";
$subject = "Contacto desde Rolfing®Gabriel";
$headers = "From: Form Mailer";
$forward = 0;
$location = "";
$date = date ("l, F jS, Y");
$time = date ("h:i A");
$msg = "El resultado del formulario de contacto desde Rolfing®Gabriel.
Enviado in $date at $time.\n\n";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
echo "Tu mensaje ha sido enviado con exito. Gracias por enviar el mensaje a Rolfing®Gabriel!
Thank you for submitting our form. We will get back to you as soon as possible.";
}
?>