Simple Authentication Systems
Posted: Mon Oct 18, 2004 9:24 pm
Hi all,
I just put up Apache, MySQL and PHP on my home server. The server is for my friends, family and I only. I don't want people from the net snooping around etcetera on my server. Below I've listed what I'm trying to do, any help would be greatly appreciated.
*/ A little more info first */
I currently have the website developed, and phpBB installed and running perfectly. At the moment the site is simply .html files with the exception to the forum.
I would like to create a login page that will keep the Internet out but allow my friends and family in. The login page should consist of a user/pass text input boxes and a submit button. I only need 1 set of credentials, I will give the credentials to all my friends etcetera. So long as the credentials submited are the right ones they get access to the site.
If someone comes to the site and tries to put in a valid url on the server without logging in they get shot back to the login page.
If they do login successfully they get access to the entire site.
I have tried using numerous examples I've found on the net but because I'm new to Apache/MySQL/PHP and all I haven't had any luck except with the code I'll post in a second.
The simple login I did get working could possibly do the trick if.....
When they successfully login a variable is set saying so and every page on the site checks the value of the variable, if it's set to true they page is loaded else they get shot to the login page.
Thanks
I just put up Apache, MySQL and PHP on my home server. The server is for my friends, family and I only. I don't want people from the net snooping around etcetera on my server. Below I've listed what I'm trying to do, any help would be greatly appreciated.
*/ A little more info first */
I currently have the website developed, and phpBB installed and running perfectly. At the moment the site is simply .html files with the exception to the forum.
I would like to create a login page that will keep the Internet out but allow my friends and family in. The login page should consist of a user/pass text input boxes and a submit button. I only need 1 set of credentials, I will give the credentials to all my friends etcetera. So long as the credentials submited are the right ones they get access to the site.
If someone comes to the site and tries to put in a valid url on the server without logging in they get shot back to the login page.
If they do login successfully they get access to the entire site.
I have tried using numerous examples I've found on the net but because I'm new to Apache/MySQL/PHP and all I haven't had any luck except with the code I'll post in a second.
The simple login I did get working could possibly do the trick if.....
When they successfully login a variable is set saying so and every page on the site checks the value of the variable, if it's set to true they page is loaded else they get shot to the login page.
Thanks