How in a PHP script do I redirect to another page? I tried header
, but this didn't work since before my header() statement is an echo.
This, I do not want to use:
echo "<meta http-equiv='refresh' content='1;URL=?".$link."'>";
You would want to do the following:
header('Location: http://www.someURL.com');
But this must be done before anything is dropped to the output steam. Also you would not want to use
echo "<meta http-equiv='refresh' content='1;URL=?".$link."'>";
As it would force the browser to reload your page, effectively rendering it useless if the user is trying to click a link or type something just as it refreshes.