October 20, 2022
Page redirect in PHP
The header()
function can be used to send a new HTTP header to client, so to redirect it to a new page. Example is:
header('Location: '.$newURL);
Alternately JavaScript can be used within PHP or HTML code to do the same:
<script type="text/javascript">
window.location = "http://www.google.com/"
</script>'