Forum Moderators: coopster

Message Too Old, No Replies

PHP $ GET, 404 Error Page and Logout Issue

         

username

11:18 pm on Jul 10, 2008 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi, I have a 404 error page which sits at www.....com/error/. This page is activated using a .htacess file and works as perfectly except for when you logout from this page. The functionality uses a $_GET to grab a variable and value which is "action=out". This works from all other pages, but will not grab the $_GET['action'] value from the 404 error page. I have echoed out the value and it is blank. This is stopping the whole logut feature from functioning as it is dependent on this.

Can anyone help with this strange refusal to grab a $_GET value?

Thanks.

cameraman

7:05 am on Jul 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On an error page it's not in the same place. The url that caused the problem is put into:
$_SERVER['REDIRECT_URL']

You can use parse_url() [us2.php.net] to get the query parameters out of it.

username

7:53 am on Jul 11, 2008 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks Cameraman...parse_url() was an easy to use function that gave good support for this issue. Job done.