Login | Register | FAQ
Anonymous

how do i create Register/login to a website?

+ Post a reply

7 posts Page 1 of 1


how do i create Register/login to a website?

by Heros55 » Fri Apr 22, 2011 12:48 pm

please can anyone tell me how to make a page for Register and login ? thanks.
User avatar

Heros55

  • Posts: 5
  • Joined: Thu Apr 21, 2011 3:40 pm

Re: how do i create Register/login to a website?

by HTML.net » Fri Apr 22, 2011 6:16 pm

A member login system requires some server side coding (like ASP or PHP).

But if you just need a very simple login system (without much security) you can use the javascript below:

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="en">
<head>
<title>Login</title>
</head>
<body>

<script type="text/javascript">

function CheckPassword() {
  var username=document.login.username.value;
  var password=document.login.password.value;
  location.href = username + password+'.htm';
}

</script>

<form method="post" action="ingen_javascript.htm"
  onsubmit="CheckPassword();return false;" name="login">
<pre>
Username: <input type="text" name="username">
Password: <input type="password" name="password">
</pre>
<input type="submit" value="log på"
  onclick="CheckPassword();return false;">
</form>

</body>
</html>



The script simply put the username and password together and sent you to the page with this name (eg. username: user001 and password: sesam will send you to the page user001sesam.htm).

There will be an example of a login system in the coming PHP tutoroial (and ASP tutorial).

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1185
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: how do i create Register/login to a website?

by Heros55 » Sat Apr 23, 2011 10:57 am

THank you admin :)
User avatar

Heros55

  • Posts: 5
  • Joined: Thu Apr 21, 2011 3:40 pm

Re: how do i create Register/login to a website?

by Heros55 » Sat Apr 23, 2011 10:59 am

but can u tell me where i learn about php? it seems like u dont have a tutorial about that here :/ i just go php.net and find something named tutorial in forum or something?
User avatar

Heros55

  • Posts: 5
  • Joined: Thu Apr 21, 2011 3:40 pm

Re: how do i create Register/login to a website?

by Heros55 » Sat Apr 23, 2011 12:12 pm

ah i found a tutorial for php :)
User avatar

Heros55

  • Posts: 5
  • Joined: Thu Apr 21, 2011 3:40 pm

Re: how do i create Register/login to a website?

by HTML.net » Sat Apr 23, 2011 5:35 pm

We will soon launch a PHP tutorial here at HTML.net!

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1185
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: how do i create Register/login to a website?

by Hellhound17 » Sun Apr 24, 2011 5:07 pm

I also need a bit of help with this, i need to know how to store the info that they register for coz i got the submit button but nothing happens after and need to know how to do the login also. If u can could u pls just add me on steam if u know how to do this my username is:
nicoloisbad
User avatar

Hellhound17

  • Posts: 1
  • Joined: Sun Apr 24, 2011 1:09 pm


+ Post a reply

Page 1 of 1

?>