Reply to Re: $HTTP_REFERER crashes my system like clockwork

Your name:

Reply:


Posted by Benjamin Esham on 11/26/33 11:53

walterbyrd wrote:

> This is the routine that crashes everything.
>
> #if either form field is empty return to the log-in page
> if ( (!$username) or (!$password) )
> {
> header("Location:$HTTP_REFERER");
> exit();
> }
>
> Again, it all works with PHP 4..4.2, crashes with PHP 5.1.4. Also if I try
> to do anything else with $HTTP_REFERER, the system crashes.
>
> By "crashes" I mean I either get a blank page, or an error message that
> the headers are already loaded.

This may or may not help, but is there really no space between "Location:"
and "$HTTP_REFERER"? Because there should be.

Also, you might try using $_SERVER['HTTP_REFERER'] instead, assuming you're
running PHP >= 4.1.0.

HTH,
--
Benjamin D. Esham
bdesham@gmail.com | AIM: bdesham128 | Jabber: same as e-mail
"I think I'd most like to spend a day with Harry. I'd take him
out for a meal and apologise for everything I've put him through."
— J. K. Rowling

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация