HTTP_REFERER reliability

From: Date: Sun, 16 Mar 2003 10:52:38 +0000
Subject: HTTP_REFERER reliability
Groups: php.general 
Request: Send a blank email to php-general+get-139851@lists.php.net to get a copy of this message
I have a small login form on the home page of my site. At the moment, when people enter their user details and hit 'send', they go to another page which check their details and, if they are successful, prints a welcome message. The problem is, they are now on this page and have to work their way back to the home page. I can provide a link for this, of course, but that limits the number of pages that can have such a login panel, because I have to hand-code the return link. I've experimented using $_SERVER['HTTP_REFERER'] which seems to work here. If the user enters valid login details, the session vars are set and they are bounced automatically back to the original page - which is fab. But the manual says that HTTP_REFERER is unreliable, so I'm intrigued to know exactly what the problems are. Any ideas?

« previous php.general (#139851) next »