Ver Mensaje Individual
  #5 (permalink)  
Antiguo 10/08/2010, 13:27
Avatar de hector_he
hector_he
 
Fecha de Ingreso: agosto-2006
Ubicación: Barcelona
Mensajes: 207
Antigüedad: 17 años, 8 meses
Puntos: 4
Respuesta: Error formulario php i include?

Hola, muchas gracias por la ayuda!

Pero no se porque me sigui sin funcionar...
He cambiado algunos include pero he actualizado el código, pero sigue sin hacer nada.

Código PHP:
<?php
// comprobar que se ha enviado el formulario
if( isset($_POST['submit']) && isset($_POST['message']) && isset($_POST['email']) ){
$mail='[email protected]';
 
// htmlentities para filtrar el contenido recibido del formulario
$nombre htmlentities($_POST['nombre']);
 
// revisar que la dirección de e-mail recibida mediante el formulario tenga un formato correcto
if (preg_match('/^[^@\s<&>]+@([-a-z0-9]+\.)+[a-z]{2,}$/i'$_POST['email'])) 

$email $_POST['email'];
}
 
// htmlentities para filtrar el contenido recibido del formulario
$message htmlentities($_POST['message']);
 
$thank="cont_ok.php";
 
$message "
nombre:"
.$nombre."
email:"
.$email."
message:"
.$message."";
 
if (
mail($mail,"consulta",$message)){
       
Header ("Location: $thank");
}
}
?>

<?php include ("head.html");?>
<?php 
include ("javas.html");?>
</head>
<?php include ("menu.html");?>

<!-- COS -->
<div id="main">
<div class="text">
<div><img src="img/headers/cont_cat.jpg" /></div>
<br />

<form class="form" name="form1" method="post" action="cont.php">
<h4>Name</h4>
<input name="nombre" type="text" id="nombre">
<br /><br />
<h4>Email</h4>
<input name="email" type="text" id="email">
<br /><br />
<h4>Text:</h4>
<textarea name="message" id="message"></textarea>
<br /><br />
<input class="formb" type="submit" name="Submit" value="Send">
</form> 

<br /><br />
<h4>Email &amp; Telf.</h4>
<ul>
<li>[email protected] | Telf. 872 163 523</li>
</ul>

</div>

<?php include ("pase.html");?>

<div style="clear:both;"></div>
</div><!-- #divbody -->

<?php include ("footer.html");?>
No se ha que puede ser debido...
Gracias de antemano!