473,666 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Login and registration for my site help??

1 New Member
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="JavaS cript">


<!-- 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><cent er><font size="+2"><b>Lo gin</b></font></center></td></tr>
<tr><td>Usernam e:</td><td><input type=text name=username></td></tr>
<tr><td>Passwor d:</td><td><input type=password name=password></td></tr>
<tr><td colspan=2 align=center><i nput 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 1692
acoder
16,027 Recognized Expert Moderator MVP
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
1721
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 try and access the restricted pages it takes me back to the login page. The local root folder for the site is:
1
2675
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 mainly becaose of my bad english, and that bad english is also reason why am I learning php that slow...). As first, what is problem: some users after succsesfull registration and login can not see "memeber_menu" and can not activly participate...
1
5494
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 register a username and password & then login with those details, but so far I am having only marginal success. I am far from an expert on ASP programming, indeed the code I am using comes from "Sams Teach Yourself E-Commerce Programming with ASP" but it...
2
2405
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 database,tables needed but when you enter a username and password to register the database,table records dont write the information so when attempting to login it states name/pass dont exist here is the registration.php file if anyone can point me in the...
9
3584
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 "myDB" with a table "myUsers" with fields "Username" and "Password". I also have the MySQL ODBC driver loaded with a DSN "dsnMySQL" setup. First question is can someone direct me to a site or provide a sample code for a login page that...
3
6219
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 has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
1
1669
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; $passconfirm = $_POST; $result = mysql_query("SELECT username FROM users WHERE username = $login"); if(!$result)
3
1908
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 information. I believe i am not connecting to the access table correctly. Here are some of the characters I used(hope this helps clear up my asp page) Email --- this is the title to the login column in my access table Password --- password...
1
2003
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 even tried with echo also how to solve this the message should come under in the same window only see my code it is program ---- <?php // Connects to your Database mysql_connect('localhost', 'root', 'epara') or die(mysql_error());
0
8445
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.