I looked up the manual on php.net for $_SERVER[‘HTTP_REFERER’] and it explicity says that it is unreliable depending on the browser being used on the client side. Is there a consistent replacement that I can use to redirect websites to the referring link?
EDIT: I didn’t realize the error in my question until someone pointed it out in the comments – this is for an internal url as I’m trying to auto-redirect the sign-out button so a user doesn’t have to see a separate message like ‘you have been successfully logged out’
you can pass the location to go back to in the sign-out link\button. if its a link you can add it to the url, if a button a hidden form field.
form
CURRENT_URL =
$_SERVER['PHP_SELF'], or what ever is appropriate for your system.