473,395 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Login and registration for my site help??

Im trying to make a personal website with a log in/registration system. I found some help with the log in and now i just need some help with the registration. This is the coding im already using:

[HTML]<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 STRICT//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<HEAD>
<link rel="stylesheet" type="text/css" href=file:///c:/html/web2.css />
<SCRIPT LANGUAGE="JavaScript">


<!-- Begin
[/HTML]
Expand|Select|Wrap|Line Numbers
  1. function Login(){
  2. var done=0;
  3. var username=document.login.username.value;
  4. username=username.toLowerCase();
  5. var password=document.login.password.value;
  6. password=password.toLowerCase();
  7. if (username=="member1" && password=="password1") { window.location="homepage.html"; done=1; }
  8. if (username=="member2" && password=="password2") { window.location="page2.html"; done=1; }
  9. if (username=="member3" && password=="password3") { window.location="page3.html"; done=1; }
  10. if (done==0) { alert("Invalid login!"); }
  11. }
[HTML]
// End -->
</SCRIPT>
</head>

<BODY>

<center>
<form name=login>
<table width=225 border=1 cellpadding=3>
<tr><td colspan=2><center><font size="+2"><b>Login</b></font></center></td></tr>
<tr><td>Username:</td><td><input type=text name=username></td></tr>
<tr><td>Password:</td><td><input type=password name=password></td></tr>
<tr><td colspan=2 align=center><input type=button value="Login!" onClick="Login()"></td></tr>
</table>
</form>
</center>
</html>[/HTML]

what i want to do is add another form with username/password just like the last one except when you push the button i want it to add username/password values for the function to use. I dont even know if this is even possible. I dont really know java, im learning visual basics right now.
Nov 4 '07 #1
1 1670
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

This should be done on the server-side. I can see the valid usernames and passwords and easily login. With server-side code, this validation code would not be seen and is more secure.

Which server-side language (if any) are you using?
Nov 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John | last post by:
Hello I have created login pages but am having problems when I test them for my site. When I type all the registration info in it accepts it no problem. When I try and sign in though and then...
1
by: JaNE | last post by:
Hello, I have made my cms... and is working, but have some, let me say "bugs"... And I don't know all reasons, please allow me slightly longer and most probably confusing post (that "confusing" is...
1
by: Wayne Smith | last post by:
Applies to: Microsoft FrontPage 2000, Microsoft Access 2000, IIS 5.0 Operating System: Microsoft Windows 2000 Professional I am trying to protect a portion of a web site by allowing users to...
2
by: drah | last post by:
Hello not exactly sure if it is a php script problem or a database/table issue i apologize if i'mposting in wrong category. I was asked to put a login script on a site for someone and i made the...
9
by: Ben | last post by:
Hello, I'll bet this has been asked a million times but I can't seem to find a thread that gives the clear example I need. This PC has MySQL and IIS configured and running. The MySQL database is...
3
by: satishknight | last post by:
Hi, Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it...
1
by: bradorn | last post by:
I'm making a registration form to be able to log on my site. This is the code for registrating. <html> <body> <?php include ("connect.php"); $login = $_POST; $pass = $_POST; ...
3
by: jerrydigital | last post by:
Hello, I have created a login.asp page which i have posted below. When I login into my site, it automatically takes me to the redirect page "index.html" which means that i entered the wrong login...
1
by: geetamadhavi | last post by:
Hi All, I have developed a php applciaiton where a new window is opening on checking the whether valid user orntot how to make that in same window after checking i have die(' not valid user ' ); i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.