Reply to Re: [PHP] New identification after an error...

Your name:


Posted by Richard Davey on 01/20/06 16:33

On 20 Jan 2006, at 14:24, David BERCOT wrote:

> I use this program to force a user to authenticate :
> if (!isset($_SERVER["PHP_AUTH_USER"])) {
> header("WWW-Authenticate: Basic realm=\"Intranet SDSED\"");
> header("HTTP/1.1 401 Unauthorized");
> }
> Everything is ok except a detail : if the user makes a mistake (for
> example, a bad password), the variable $_SERVER["PHP_AUTH_USER"] is
> initialised.
> So, if he wants to do again the above test, another identification
> won't
> happen (because $_SERVER["PHP_AUTH_USER"] is already set).
> I've tried :
> without succes...

You could either insert a second check (after the PHP AUTH USER
isset) along the lines of is_empty(), or just replace the isset with
is_empty() entirely.


Zend Certified Engineer
PHP Development Services

[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

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