LizzyBug
05-31-2005, 09:36 PM
I'm trying to make a staff page that is only password accessible. Can someone help me to make the page small without any information except the title bar?
LizzyBug
LizzyBug
|
Click to See Complete Forum and Search --> : Password safe area... how do I get one? LizzyBug 05-31-2005, 09:36 PM I'm trying to make a staff page that is only password accessible. Can someone help me to make the page small without any information except the title bar? LizzyBug buntine 05-31-2005, 10:38 PM Generally, you need a database to store the details of each authorised user, such as a username, password and email address. The user will input their username and password and then a server-side application will generate an SQL query that, if successful, will allow the user to browse the protected pages. Do you have any experience in server-side programming? Language options include PHP, ASP, JSP, Perl, and many more. Which language you use is really up to the technological restrictions of the server your Web Site is hosted on. Regards. LizzyBug 08-31-2005, 01:18 PM Generally, you need a database to store the details of each authorised user, such as a username, password and email address. The user will input their username and password and then a server-side application will generate an SQL query that, if successful, will allow the user to browse the protected pages. Do you have any experience in server-side programming? Language options include PHP, ASP, JSP, Perl, and many more. Which language you use is really up to the technological restrictions of the server your Web Site is hosted on. Regards. I'm trying to make a very simple password-coded page. How would I create a page like this? It will only have a single password for everyone to enter. Lizzy conputerguy99 09-05-2005, 03:02 PM You would want to use PHP for the password part and Javascript to open a separate window with only the title bar. The PHP I could help you with, but the javascript you would have to get from that board. conputerguy99 09-05-2005, 03:18 PM You will need to write a form with a text field. You need the attribute "name" to be "pass". The form attribute "method" would be "get". Then I believe this script would work. Put this script in your head section. <?php $pass = $_GET['pass']; if($pass == "Whatever your password should be") {print "<META http-equiv='refresh' content='2; URL=password protected part of your site'>"; } else {print "<META http-equiv="refresh" content='2; URL=login page url'>"; } ?> Then put this script in the body of your script. <?php if($pass == "whatever you want your password to be") {print "<a href='url of password protected part of your site'>Please click here if you are not automatically redirected.</a>"; } else {print "Sorry, that is an invalid password. Please <a href='login page url'>try again</a>."; } ?> This should work. conputerguy99 09-05-2005, 03:19 PM Just replace some of the information, such as the password and the URLs. SpectreReturns 09-07-2005, 10:40 PM I would use header('Location: path/to/file.html'); Also, you would need to set some authorization into a session and read it on each protected page, to make sure that unauthorized users aren't on the page. [EDIT] The aforementioned code applies to the above poster's code, instead of using META tags. bathurst_guy 09-07-2005, 10:47 PM i wouldnt use the get method, but the post for the form. If all the files are in one folder, you can put a user and pass on that folder using .htaccess (http://www.webmaster-toolkit.com/htaccess-generator.shtml) sae 09-21-2005, 12:50 PM Keep it simple! If all the files are in one folder, you can put a user and pass on that folder using .htaccess (http://www.webmaster-toolkit.com/htaccess-generator.shtml) webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |