Web Page password

liunx

Guest
Hi..<br />
<br />
I am designing a web site, which consists of an adminstrator(me) to input information on a weekly basic. I have link called "Adminstrator Update View"...which takes me into another web page....where I want to be able to input different figures on a weekly basic. Then click on "Update", which then takes you back to the beginning. When the user goes in to the list..I want the user to be able to see the new updated figures.<br />
<br />
When clicking on "Adminstrator Update View"...I want a password setup here, so only I can go in and make changes to the figures. Could anyone please help me out here...as I am totally stuck.<br />
I would really apprecaite any help..<br />
<br />
Thank in advance<br />
<br />
Ruby<!--content-->Did you set that up yourself or use a script or was it pre-installed? I think that you can use HTACCESS for that page.<br />
<br />
<!-- m --><a class="postlink" href="http://faq.clever.net/htaccess.htm">http://faq.clever.net/htaccess.htm</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://www.echodev.com/tutorials/misc/htaccess/index.shtml">http://www.echodev.com/tutorials/misc/h ... ndex.shtml</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://www.superscripts.com/tutorial/htaccess.html">http://www.superscripts.com/tutorial/htaccess.html</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://www.theriver.com/trwrc/htaccess.html">http://www.theriver.com/trwrc/htaccess.html</a><!-- m --><!--content-->Hey.<br />
<br />
This can be done in a number of different ways depending on what securities you want. If the data you are saving isn't really "important" (not saying that it is), then you could simply use a little javascript with a hardcoded password. This would not really give a great deal of security, but it is simple.<br />
<br />
Otherwise, there are a number of ways to do it using CGI. You could just have a file with your admin username/password and have an intermediate screen where the person trying to access your admin area would input a username and password which would be checked against the flat ascii file. Also, you could use a simple encryption algorithm to stop people from just hacking the file and viewing it.<br />
<br />
You could also do the same above except using a database instead of a flat ascii file if there are going to by many username/passwords, otherwise it isn't very efficient.<br />
<br />
Another idea is to use the htaccess file, as suggested by whkoh before. This is usually a one way encryption where you would encrypt a password and store it with your username into the .htaccess file separated by a ":". Only when you go to check the passwords, just encrypt the password given and see if that matches the other encrypted password.<br />
<br />
As you can see, there are many directions you can go with this one, depending on what you either know, or are willing to learn.<br />
<br />
Hope this helps!<br />
<br />
Ken<!--content-->thanks alot kharris for getting back to me and informing me about the ways I could do this. <br />
<br />
I am interested in the first option you mentioned about little javascript with a hardcoded password. Do you have the javascript that I need to insert. The data is not that secure, so this seems like an interesting option for me.<br />
<br />
I would appreciate if you could help me out with this problem.<br />
<br />
Thank you again<br />
<br />
Ruby<!--content-->This is the script from Website Abastraction:<br />
<form><br />
<p>ENTER USER NAME : <br />
<input type="text" name="text2"><br />
</p><br />
<p> ENTER PASSWORD :<br />
<input type="password" name="text1"><br />
<input type="button" value="Check In" name="Submit" onclick=javascript:validate(text2.value,"free",text1.value,"javascript") ><br />
</p><br />
<br />
</form><br />
<script language = "javascript"><br />
<br />
/*<br />
Script by Anubhav Misra (<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->)<br />
Submitted to Website Abstraction (<!-- m --><a class="postlink" href="http://wsabstract.com">http://wsabstract.com</a><!-- m -->)<br />
For this and 400+ free scripts, visit <!-- m --><a class="postlink" href="http://wsabstract.com">http://wsabstract.com</a><!-- m --><br />
*/<br />
<br />
function validate(text1,text2,text3,text4)<br />
{<br />
if (text1==text2 && text3==text4)<br />
load('success.htm');<br />
else <br />
{<br />
load('failure.htm');<br />
}<br />
}<br />
function load(url)<br />
{<br />
location.href=http://www.htmlforums.com/archive/index.php/url;<br />
}<br />
</script><br />
<br />
<p align="center"><font face="arial" size="-2">This free script provided by <a href=http://www.htmlforums.com/archive/index.php/"http://wsabstract.com">Website Abstraction</a></font></p><!--content-->
 
Back
Top