954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Can't get login to work online!!!!!

I am working on this site which has a login page, it is up live and works fine from my computer but can't get it to work anywhere else.

This is the code:

USER NAME :

PASSWORD :



Does anyone know what I'm doing wrong?

cynch
Newbie Poster
10 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

You don't need the "javascript:" in the onclick attribute. Other than that, I'd need to know more about the specific problem. You might need full URLs rather than just filenames for "success.html" and "failure.html". What error are you getting?

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 
You don't need the "javascript:" in the onclick attribute. Other than that, I'd need to know more about the specific problem. You might need full URLs rather than just filenames for "success.html" and "failure.html". What error are you getting?


it's ok all sorted out now...

cheers
cynch

cynch
Newbie Poster
10 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

I can't help but ask. cynch, you do realize that this login script has zero security value, right? The username and password are written out to the browser and viewable in the source code.

Troy
Posting Whiz
362 posts since Jun 2005
Reputation Points: 36
Solved Threads: 6
 

yes i am aware of this but i am new to all of this and could not find anything that i could make work

cynch
Newbie Poster
10 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

cynch, for what it's worth, if your server supports PHP, I submitted what I think is an elegant code solution for managing user sessions and password-protecting PHP pages. It's here on Daniweb in the Code Snippets section.

http://www.daniweb.com/code/snippet291.html

You do need to be a programmer, though, to incorporate the class. I've included a lot of comments and example usage in the code.

Troy
Posting Whiz
362 posts since Jun 2005
Reputation Points: 36
Solved Threads: 6
 

I am having the same problem. Do i have to make a 'Sign Up' page before the log in code works?

the code that i have is:

<form>
<p align="right"><font color="#FFFFFF" size="3" face="Baskerville Old Face">Username: 
<input type="text" name="text2"></font>
</p>
<p align="right"><font color="#FFFFFF" size="3" face="Baskerville Old Face"> Password:
<input type="password" name="text1"></font>
<input type="button" value="Log In" name="Submit" onclick=validate(text2.value,"Username 

#1",text1.value,"Password#1") >
</p>

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


function validate(text1,text2,text3,text4)
{
if (text1==text2 && text3==text4)
load('success.htm');
else 
{
load('failure.htm');
}
}
function load(url)
{
location.href=url;
}
</script>
Stuart S2
Newbie Poster
1 post since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You