|
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]
|