webref.eu Posted January 30, 2009 Share Posted January 30, 2009 Hi All I have this bit of code that controls a redirect after successful login. It's some way down in the script, it works in Firefox, but it doesn't work in Google Chrome, any ideas why, and what it should be changed to: /* Quick self-redirect to avoid resending data on refresh */ echo "Login successful! Redirecting ..."; echo "<meta http-equiv=\"Refresh\" content=\"2;url=http://www.reviewby.me" . $redirect . ">"; return; Thanks Link to comment https://forums.phpfreaks.com/topic/143128-why-doesnt-this-redirect-work-in-google-chrome/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 30, 2009 Share Posted January 30, 2009 <meta tags belong inside the <head> </head> tags of a document and before any content on the web page. Google Chrome is probably just enforcing the rules that other browsers ignore. Link to comment https://forums.phpfreaks.com/topic/143128-why-doesnt-this-redirect-work-in-google-chrome/#findComment-750642 Share on other sites More sharing options...
webref.eu Posted January 30, 2009 Author Share Posted January 30, 2009 OK, thanks. I changed it to: header("Refresh: 0; URL=$redirect"); which seems to work. Rgds Link to comment https://forums.phpfreaks.com/topic/143128-why-doesnt-this-redirect-work-in-google-chrome/#findComment-750643 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.