I have a website and I am making a log in page where you enter your username and password and it will take you to a page. I have it now so you can enter your username and password and it will take you to the page specified BUT, I cannot for the life of me figure out how I can make it to I can have different usernames and passwords take you to different pages. For ex.
Username-28
Password-28
Takes you to-Home
Username- 56
Password- 56
Takes you to- Page2
I cant figure out what needs to be changed or what needs to be added. I am familiar with VB.Net but I don’t understand much Java Script ( Sorry I posted this here but a few of you know me as a regular and I don’t know of any other forums to go to. Any help here or pointer would be great. Thanks in advance.
Chad
function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = 1
usercode = 1
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
if(usercode==28&&passcode==28)
{
window.location=password+".html"}
else{
alert("password/username combination wrong")}
}
I left out the start script and end script command and I also could not post the form because it would build it into my thread<!--
<FORM name=password1><script>
function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = 1
usercode = 1
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
if(usercode==3.01618134903548e+32&&passcode==3881509632)
{
window.location=password+"&2468+24.html"}
else{
alert("password/username combination wrong")}
}
</script>
<form name="password1">
Enter username:
<input type="text" name="username2" size="15">
Enter password:
<input type="password" name="password2" size="15">
<input type="button" value="Submit" onClick="submitentry()">
</form>
--></FORM>
Username-28
Password-28
Takes you to-Home
Username- 56
Password- 56
Takes you to- Page2
I cant figure out what needs to be changed or what needs to be added. I am familiar with VB.Net but I don’t understand much Java Script ( Sorry I posted this here but a few of you know me as a regular and I don’t know of any other forums to go to. Any help here or pointer would be great. Thanks in advance.
Chad
function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = 1
usercode = 1
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
if(usercode==28&&passcode==28)
{
window.location=password+".html"}
else{
alert("password/username combination wrong")}
}
I left out the start script and end script command and I also could not post the form because it would build it into my thread<!--
<FORM name=password1><script>
function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = 1
usercode = 1
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
if(usercode==3.01618134903548e+32&&passcode==3881509632)
{
window.location=password+"&2468+24.html"}
else{
alert("password/username combination wrong")}
}
</script>
<form name="password1">
Enter username:
<input type="text" name="username2" size="15">
Enter password:
<input type="password" name="password2" size="15">
<input type="button" value="Submit" onClick="submitentry()">
</form>
--></FORM>




