You are here: Re: DIssapearing/reappearing Session variables « PHP Programming Language « IT news, forums, messages
Re: DIssapearing/reappearing Session variables

Posted by dangerd on 04/12/07 18:34

On Apr 10, 7:53 am, iktorn <s...@phpfreelancer.net> wrote:
> dangerd napisał(a):
>
> > On Apr 10, 6:44 am, iktorn <s...@phpfreelancer.net> wrote:
> >> dangerd napisał(a):
>
> > Wiktor,
>
> > I have tried what you suggested but the problem, still persists. I
> > have updated the txt code so you can see for yourself.
> > ...any more ideas?
>
> > Thanks
>
> > Duncs
>
> replace auth function with these piece of code, should work
>
> function auth ( $login = '', $password = '' )
> {
> if (isset($_SESSION['authdata']['login'])) {
> return TRUE;
> }
> elseif (!empty($login))
> {
> if ( $login == myuser && $password == mypass or $login ==
> myuser2 && $password == mypass2 ) {
> $_SESSION['authdata'] = array ( "login" => $login );
> return TRUE;
> }
>
> $_SESSION['authdata'] = array();
> return FALSE;
> }
> else {
> return FALSE;
> }
>
> }
>
> your previous function used "global $authdata;" - variable $authdata
> would only exist if you had register_globals turned on.
>
> --
> Wiktor Walchttp://phpfreelancer.net

Ace!!

You nailed it. You have made my day!

You are a king amongst men my friend.

Thanks

 

Navigation:

[Reply to this 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

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