SEO | Link Popularity | Search Engine Consulting | SEO Tutorial | SEO Tools | SEO Forum
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-30-2004, 06:34 PM
fruitbeard fruitbeard is offline
SEO Junior
 
Join Date: Aug 2004
Posts: 1 fruitbeard is on a distinguished road
Red face Password thingy

Hi

Can anybody help me with this little problem i have?

Its just a sort of password protectd html page.

new to scripting,so give me a chance.

Basically i have a enter username/password page.

if you dont enter a name or a password it takes you to a please try again page, the same if you get both fields wrong, but if you get it right it also takes you to the try again page.

username and password refer to a seperate html page of both names with an _ inbetween. i.e myname_mypassword.html would be correct.

the code.

<SCRIPT LANGUAGE="JavaScript">

function checkuser()

{
var user = document.login.user.value
var password = document.login.password.value
if (user == "" || password == "")
{
var doc = "retry.html"
this.location.href = doc
}
if (doc !== user + "_" + password + ".html")
{
var doc = "retry.html"
this.location.href = doc
}
else
{
var doc = user + "_" + password + ".html"
this.location.href = doc
}
}

</SCRIPT>

function called up with a submit button.

Thanks for any help upfront.

FruitBeard
Reply With Quote
  #2  
Old 09-01-2004, 01:07 AM
Cyber-SEO's Avatar
Cyber-SEO Cyber-SEO is offline
Chillin Like A Villan
 
Join Date: May 2004
Posts: 275 Cyber-SEO is on a distinguished road
FruitBeard,

It seems to me that you are using JavaScript as a security feature for your website. This is a very bad idea becuase anyone can view the source of the code and find out exactly what the password is.

What you should do is use a server side language such as ASP or PHP for your login feature. It is very simple to do and is a million times more secure.

Cyber.
__________________
Rentals
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Login/Register
User Name
Password
Remember Me?

Forum Links
Forum Home
SEO Forum
Internet Marketing Forum
Web Design Forum
Web Hosting Forum
Programming Forum
SEO Chat

Quick Links
Forum Home
New Posts
Mark Forums Read
Open Buddy List
User Control Panel
Edit Avatar
Edit Profile
Edit Options
Miscellaneous
Subscribed Threads
My Profile

Search Forums

Advanced Search
All times are GMT -8. The time now is 03:34 PM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.