I am wondering if it's possible to redirect a user to another page from a php file after a delay of some kind.
I.E user will click send this will then show them what has been sent and then re-direct them back to the home page.
I am wondering if it's possible to redirect a user to another page from a php file after a delay of some kind.
I.E user will click send this will then show them what has been sent and then re-direct them back to the home page.
Since you already have the body sent (showing the "Message sent" thing), using header("Location:...");
is out of the question.
Just do it in JS:
<script type="text/javascript">
setTimeout(function() {location.href="...";},2000); // 2000 ms = 2 seconds
</script>