RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1870 | Replies: 5
Reply
Join Date: Jun 2005
Posts: 10
Reputation: cynch is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
cynch cynch is offline Offline
Newbie Poster

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

  #1  
Jun 15th, 2005
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:

<form>
<p><B><FONT SIZE="2" FACE="ARIAL">USER NAME :</B>
<input type="text" name="text2">
</p>

<p><B>PASSWORD :</B>
<input type="password" name="text1">
<input type="button" value="Login" name="Submit" onclick=javascript:validate(text2.value,"tekko",text1.value,"sydney") >
</p>

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

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


Does anyone know what I'm doing wrong?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,592
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

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

  #2  
Jun 16th, 2005
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?
Reply With Quote  
Join Date: Jun 2005
Posts: 10
Reputation: cynch is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
cynch cynch is offline Offline
Newbie Poster

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

  #3  
Jun 16th, 2005
Originally Posted by tgreer
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
Reply With Quote  
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 345
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

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

  #4  
Jun 16th, 2005
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 Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
Join Date: Jun 2005
Posts: 10
Reputation: cynch is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
cynch cynch is offline Offline
Newbie Poster

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

  #5  
Jun 20th, 2005
yes i am aware of this but i am new to all of this and could not find anything that i could make work
Reply With Quote  
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 345
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

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

  #6  
Jun 21st, 2005
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 Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:15 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC