if($_POST){
if($checkout_form == "checkout"){
if($orderpersonname == "" || $orderpersonemail == ""){
$checkouterror = "<p><font style=\"color: red;\">Please enter your full name and email address before checking out</font></p>";
}elseif(!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $orderpersonemail)){
$checkouterror = "<p><font style=\"color: red;\">Please enter a valid email address</font></p>";
}elseif(!isset($_POST['tnc'])){
$checkouterror = "<p><font style=\"color: red;\">Please accept the terms and conditions to complete this entry before checking out</font></p>";
}
else{
header("Location: http://www.google.com.my");
exit;
}
}
}
I have the code above if there's no error occur it will redirect me to a checkout page, in this case I use google page as a sample. But what it does is actually brings me back to the same URL and there's a blank space above my website header and all the sidebar and content become blank. Why is that so? How to solve this redirection issue?