Hello
I have the following code. I want to load a new page after send the form but does not work. Anybody knows why?? Thanks a lot!!:)
<?
if (!$HTTP_POST_VARS){
?>
<form action="contacto.php" method="post">
<label for="user">Nombre y Apellidos</label>
<input class="campo" type="text" name="nombre" value="" /><br />
<label for="emailaddress">Direccion de email</label>
<input class="campo" type="text" name="email" value="" /><br />
<label for="comments">Comentarios</label>
<textarea cols="1" rows="1" name="comentario"></textarea><br />
<input class="button" type="submit" name="submitbutton" value="Enviar" />
</form>
<?
}else{
$cuerpo = "Formulario enviado\n";
$cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "\n";
$cuerpo .= "Email: " . $HTTP_POST_VARS["email"] . "\n";
$cuerpo .= "Comentarios: " . $HTTP_POST_VARS["comentario"] . "\n";
//send the mail...
mail("
[email protected]","Formulario recibido",$cuerpo);
header('location:newpage.php');
}
?>