you could possibly store the name/password as cookies, so
that they're available to the PHP script without the user having
to type them in more than once per session (or even longer
if you set the expire date properly)
i know that cookies are horribly insecure, but for purposes
of a very simple validation routine, cookies are sufficient)
if ( !validate_user($ck_name,$ck_pw) ) {
print "you are not logged in, please go log in";
}
else {
print "you are logged in";
}
function validate_user($ck_name, $ck_pw) {
//make whatever calls you need to the database
//to see if this name/pw combination are valid.
//return 1 if good, return 0 if bad
}
> -----Original Message-----
> From: jaskirat [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 17, 2001 00:30
> To: Brandon Feldhahn; [EMAIL PROTECTED]
> Subject: Re: [PHP] location
>
>
> make a function which validates users.
>
> Then where ever you want to restrict access just call that function before
> other things .. and it will
> do the trick where ever you need .. no if statements needed.
>
> HTH
>
> Jaskirat
>
> At 11:47 PM 2/16/01 -0800, Brandon Feldhahn wrote:
> >how would i make somthing in a IF statement that would take somone to
> >the members page when they get the login correct
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]