I have a form in my html document and when press submit button, the form calls the file form.php. Now in the form.php, i want to redirect it back to my home page and reset the previous filled form. I have tried the code below but I got a blank page. The Google url is just default.
<?php
if ($_POST['submit']) {
    if (mail ($to, $subject, $body, $from)) { 
  // To redirect to home page
  header("Location:http://www.google.com");
    } else { 
        echo '<p>Oops! An error occurred. Try sending your message again.</p>'; 
    }
}
?>Thanks for any help guys.
 
     
     
     
     
     
    