PDA

View Full Version : Javascript for logins


nancy712
02-15-2009, 01:09 PM
I want a script for reviewers to login to my site so they can have their own separate area. I found this one where you can list two URL's but I don't know how to make the second URL show. The first one does. This is just in the experimental page right now - nothing much is on the second page. Can someone tell me what I am doing wrong? Here is what I did.

<form>
<p>ENTER USER NAME :
<input type="text" name="text2">
</p>
<p> ENTER PASSWORD :
<input type="password" name="text1">
<input type="button" value="Check In" name="Submit" onclick=javascript:validate(text2.value,"reviewer",text1.value,"books") >
</p>

</form>
<script language = "javascript">

/*
Script by Anubhav Misra (anubhav_misra@hotmail.com)
Submitted to JavaScript Kit (http://javascriptkit.com)
For this and 400+ free scripts, visit http://javascriptkit.com
*/

function validate(text1,text2,text3,text4)
{
if (text1==text2 && text3==text4)
load('reviewinterest.htm');
else
{
load('reviewerpage.htm');
}
}
function load(url)
{
location.href=url;
}
</script>

<p align="center"><font face="arial" size="-2">This free script provided by <a href="http://javascriptkit.com">JavaScript Kit</a></font></p>

logictrap
02-15-2009, 04:44 PM
If you want any type of secure login you will need to use something in addition to javascript. Javascript is viewable by everyone so anyone looking at the source code of the web page will reveal the user id & password.

Try googling: php login script

There a ton of examples available.

gnomeontherun
02-16-2009, 09:55 AM
You might be more interested in checking out some CMS systems. These are much more secure and would provide you with a lot better options when splitting up different areas for each person.

Some comparisions

http://php.opensourcecms.com/scripts/show.php?catid=1&cat=CMS%20/%20Portals