PDA

View Full Version : Password Else If



BorderTerroir
06-14-2009, 06:50 AM
1) Script Title: Encrypted Password script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/password.htm

3) Describe problem: I would like the option to open other website pages using this script and I thought a simple else if would do the job.
Why doesn't this work?
}
//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==12211815000&&passcode==1825426317464164800)
else if(usercode==12211815000&&passcode==1912822615180439800)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{window.location=password+".asp"}
else{
alert("You have entered the wrong information.")}
}

thetestingsite
06-14-2009, 05:48 PM
You forgot to add the part that tells the script what to do if the condition is true (the part in red below).



//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==12211815000&&passcode==1825426317464164800) {
window.location='something.asp';
}
else if(usercode==12211815000&&passcode==1912822615180439800)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{window.location=password+".asp"}
else{
alert("You have entered the wrong information.")}
}


Hope this helps.

BorderTerroir
06-15-2009, 05:41 AM
Sorry but I'm still getting an 'Error On page' message. :(


//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==12211815000&&passcode==1825426317464164800)
{window.location=password+".asp"}
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
else if(usercode==12211815000&&passcode==1912822615180439800)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{window.location=password+".asp"}
else{
alert("You have entered the wrong information.")}
}