View Full Version : Help! I need help on a code, for password protection pages!!!


megula
07-02-2003, 02:05 PM
Well, I know how to put up a password protection on a page. Here is the code I used:<xmp><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,"USERNAME",text1.value,"PASSWORD") >
</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('SUCCESS URL');
else
{
load('FAILURE URL');
}
}
function load(url)
{
location.href=url;
}
</script><xmp>

But, the thing is, I want it to be so people can sign up, and everyone can have different usernames and passwords. Just like on neopets and stuff. So, can you help me out?

~StarLight~
07-02-2003, 07:52 PM
http://www.lissaexplains.com/forum/showthread.php?s=&threadid=36077