Is it good practise to use meta refresh tags for redirects instead of header() function in php?
- by Kent
I have to use redirects a lot in my scripts, for example after a user logs in I need to redirect them to the admin area, etc. But I find it inconvenient to always have to have the header function at the very top. So if I use the meta refresh tags for my redirects, is that something that would be frowned upon according to best practices or is it acceptable?
function redirect($location) {
echo "<meta http-equiv='refresh' content='0; url=$location' />";
}