|
Posted by iktorn on 04/10/07 06:53
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 Walc
http://phpfreelancer.net
Navigation:
[Reply to this message]
|