PDA

View Full Version : How do I make a Login Page? [SIMPLE]



Mickword
06-08-2009, 02:10 PM
Hey guys! I need to know how to make a login panel, that is quite simple. If anyone could help me I would be really happy. +REP for Help!

Jack!
06-08-2009, 02:41 PM
http://www.phptoys.com/e107_plugins/content/content.php?content.34

Mickword
06-08-2009, 03:22 PM
thanks for that, but where do I download it?

HotelUser
06-08-2009, 03:28 PM
thanks for that, but where do I download it?

Spoon fed: http://www.phptoys.com/download.php?view.19

Dentafrice
06-08-2009, 03:36 PM
thanks for that, but where do I download it?
You said make a login page, not download a login page.

Mickword
06-08-2009, 08:33 PM
Yeah, I know but ether doesn't matter.

Dentafrice
06-08-2009, 08:44 PM
Yeah it does, you asked how to make one.. downloading and making one are two separate things.

BigAlan
06-08-2009, 10:48 PM
Learn a language PHP is probably the best for multiple logins with the use of mysql, you can also use PHP to create a simple login which gets the information locally (stored in the page) or use different languages such as javascript where you can use cookies to log in. I suggest PHP and sessions (: for some PHP help..



<?php
session_start();
$username = "Admin";
$password = "Password";

if (isset($_POST['login']) && ($_POST['username'] == $username && $_POST['username'] == $username)) {
$_SESSION['username'] = $username;
} else {
echo "Sorry, wrong details!";
}
?>

Hopefully that will get you started also there is no form.. read up about PHP and HTML especially HTML Forms..

Goodluck (:

BoyBetterKnow
07-08-2009, 09:08 AM
Learn a language PHP is probably the best for multiple logins with the use of mysql, you can also use PHP to create a simple login which gets the information locally (stored in the page) or use different languages such as javascript where you can use cookies to log in. I suggest PHP and sessions (: for some PHP help..



<?php
session_start();
$username = "Admin";
$password = "Password";

if (isset($_POST['login']) && ($_POST['username'] == $username && $_POST['username'] == $username)) {
$_SESSION['username'] = $username;
} else {
echo "Sorry, wrong details!";
}
?>Hopefully that will get you started also there is no form.. read up about PHP and HTML especially HTML Forms..

Goodluck (:

Hey, why do you check username twice? :P

Fehm
07-08-2009, 09:13 AM
He's made a a very simple one that has a set password, not MySQL :P So he's checking that the username is the same as the variables and then that they match up with the two they should be. I think?

Blob
07-08-2009, 01:47 PM
He's made a a very simple one that has a set password, not MySQL :P So he's checking that the username is the same as the variables and then that they match up with the two they should be. I think?

No, he is checking if the username thats been posted is the same as the variable.. twice..

Dentafrice
07-08-2009, 03:17 PM
I think he meant for it to be $_POST["password"] == $password on the second part, but copy and pasted it and forgot to change it.

Want to hide these adverts? Register an account for free!