to EvilCoder!

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

to EvilCoder!

Post by Nik »

http://www.nikolas.tk is my web page! How can i do it for when the user clicks one of my buttons that corresponds to programs to ask him for a username and pass popping a box?

Thanks!
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

hmmnn you want a windows popup box to ask for a username and password? you would have to create a password protected directory and have an index page inside that with the linkson them, then the user can download asmuch as they want while they are inside it.
Nik
Forum Contributor
Posts: 138
Joined: Wed Jan 29, 2003 6:02 pm
Location: Thessaloniki, Greece

Post by Nik »

Yes indeed but how am i supposes to accomplish that? especially for the password protected directory?
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

have you looked in to using .htaccess and .htpasswd files?

http://www.javascriptkit.com/howto/htaccess.shtml

that will help you with htacess now this might help with .htpasswd

http://www.cts.wustl.edu/cts/help/web/a ... asswd.html
Nik
Forum Contributor
Posts: 138
Joined: Wed Jan 29, 2003 6:02 pm
Location: Thessaloniki, Greece

Post by Nik »

This is my .htaccess file but for somew reason when it prompts for authentication although i have configured .htpasswd is doesnt validate me!
And yes i have placed it correctly /home/nik/public_html/

AuthUserFile /home/nik/public_html/.htpasswd
AuthGroupFile /dev/null
AuthName "Πνευματικά Κείμενα"
AuthType Basic

require user nikos
require user nagia

Thanks!
Post Reply