HtAccess

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Nik
Forum Contributor
Posts: 138
Joined: Wed Jan 29, 2003 6:02 pm
Location: Thessaloniki, Greece

HtAccess

Post by Nik »

how can i show up a windows that prompts the user for username and password before he enters my php page??
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

Post by fractalvibes »

You could do this programtically - have a link to your login page, when they succesfully login, set a session variable. Check this session variable at the top of each page you want protected and accessible only to those
who are logged in - redirect to the login page if that check turns up false....

Something else to look at : http://javascriptkit.com/howto/htaccess.shtml
a pretty good intro to htaccess that may give you some other clues, specifically http://javascriptkit.com/howto/htaccess3.shtml

Hope that helps,

Phil J.
Nik
Forum Contributor
Posts: 138
Joined: Wed Jan 29, 2003 6:02 pm
Location: Thessaloniki, Greece

Post by Nik »

Yes the url's helped a lot! Thank you very much!
Post Reply