I have this script that sends an e-mail from an e-mail form
I want after the e-mail is sent to redirect to another page
I don’t know what I am doing wrong the php script it does not redirect to another page.
I tried to use the script that redirects me to another page to a blank page and then the code is working perfectly.
<?php
$sendTo = "info@hft.com";
$subject = "E-mail Form";
$headers = "From: " . $_POST["namef"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">\r\nContent-Type: text/html; charset=windows-1253";
$headers .= "Reply-To: " . $_POST["emailf"] . "\r\n";
$headers .= "Return-path: " . $_POST["emailf"];
$message = $_POST["messagef"];
$messagel = nl2br($messagef);
mail($sendTo, $subject, $messagel, $headers);
$URL="http://www.ntua.gr";
header ("Location: $URL");
?>
The part of the script that redirect to another page
$URL="http://www.ntua.gr";
header ("Location: $URL");
?>
Please Help me