Aquí está la página donde está el formulario.
http://www.brinteva.com/index.php?op...d=20&Itemid=34
Y aquí está el código php en cuestión:
Código PHP:
<?php
$nombre=$_POST['nombre'];
$email=$_POST['email'];
$email2=$_POST['email2'];
$telefono=$_POST['telefono'];
$celular=$_POST['celular'];
$origen=$_POST['origen'];
$destino=$_POST['destino'];
$salida=$_POST['salida'];
$regreso=$_POST['regreso'];
$adultos=$_POST['adultos'];
$infantes=$_POST['infantes'];
$comentarios=$_POST['comentarios'];
if ($nombre == "") {echo "no ingresaste tu nombre <br />";}
if ($email == "") {echo "no ingresaste tu email <br />" ;}
if ($email != $email2) {echo "tu email no corresponde con el email de confirmación <br />";}
if ($origen == "") {echo "no ingresaste la ciudad de origen, vuelve a intentar <br />";}
if ($destino == "") {echo "no ingresaste la ciudad de destino, vuelve a intentar <br />";}
if ($salida == "") {echo "no ingresaste la fecha de salida, vuelve a intentar <br />" ;}
if ($regreso == "") {echo "no ingresaste la fecha de regreso, vuelve a intentar <br />";}
if (($adultos == "0")&&($infantes == "0")) {echo "no ingresaste ningún número de viajero, vuelve a intentar <br />";}
if(($nombre == "") || ($email == "") || ($email != $email2) || ($origen == "") || ($destino == "") || ($salida == "") || ($regreso == "") || (($adultos == "0")&&($infantes == "0"))) {echo "<a href=\"javascript: window.history. go( -1 )\" ><image src='Imagenes/botonregresar.png' border='0'> </a>";}
else{
$texto="Nombre: $nombre<br>";
$texto.="E-mail: $email<br>";
$texto.="Teléfono: $telefono<br>";
$texto.="Celular: $celular<br>";
$texto.="Ciudad de Origen: $origen<br>";
$texto.="Ciudad de Destino: $destino<br>";
$texto.="Fecha de Salida: $salida<br>";
$texto.="Fecha de Regreso: $regreso<br>";
$texto.="Nº de Adultos: $adultos<br>";
$texto.="Nº de Infantes: $infantes<br>";
$texto.="Comentarios: $comentarios";
$email="[email protected]";
$asunto="Solicitud de un viaje de un cliente";
$cabeceras = "Content-type: text/html; charset=utf-8";
mail($email,$asunto,$texto,$cabeceras);
echo "<h1>Tu mensaje ha sido enviado</h1>";
echo "<p>Hemos recibido tu mensaje, en breve te responderemos</p>";
echo "<p>$texto</p>";
echo" <a href=\"javascript: window.history. go( -1 )\"><image src='Imagenes/botonregresar.png' border='0'></a><br>";
}
?>