I want to redirect the visitor to another page so I wanted the equivalent of window.location.href
in PHP
I want to redirect the visitor to another page so I wanted the equivalent of window.location.href
in PHP
Use the header .
header("Location: http://www.linkDoSite.com/");
exit();
According to the function documentation, it must be run before any output is sent. This includes any HTML, plain text, blank lines, spaces or exits of PHP itself.