The action you want shouldn't really take effect on the client side
(hyperlink) itself, because this would no doubt rely on JavaScript and would
be pathetically insecure.

Instead, what you need to think about is protecting certain pages with a
username password, and *possibly* maintaining this user/data in sessions, so
they only have to do it once.

There is a pretty good tutorial on this exact topic on Site Point:
http://www.WebmasterBase.com/article/319

I used this tutorial and code base as the basis of my own session management
and user login stuff.


It does use MySQL to maintain the users in a table, but the principal of how
he works with headers and exits could be applied to a flat file of
user/password records.


Note: it does use cookies, which you may or may not consider an issue.


Justin French
--------------------
Creative Director
http://Indent.com.au
--------------------





on 25/03/02 4:49 PM, Jack ([EMAIL PROTECTED]) wrote:

> Dear all
> Can someone pls tell me how i can make a behavior in php which when a user
> click on a hyperlink, then a page for login will appear first and then once
> the username and password is right, the page of which user aiming to browse
> will show, otherwise  a error message will tell the user that the username
> or password ar not correct.
> I know it will be easy if there is only one hyperlink, but what happen if
> there are many of them?
> 
> Thx very much
> Jack
> [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to