Dynadot โ€” .com Registration $8.99

Very Very Simple login script

Spaceship Spaceship
Watch
Impact
328
This is a very simple login script.

The Form
Code:
<html>
<body>

<form name="form" method="post" action="login.php">
Username: <br>
<input type="text" title="Username" name="Username"><br>
Password: <br>
<input type="password" title="Password" name="Password"><br>
<input type="submit" name="Submit" value="Login">

</form>
</body>
</html>

login.php
PHP:
<?php
/************************
Very Simple Login v1.0
Copyright (c) SecondVersion
************************/
$username = 'username';
$password = 'password';

if($_POST['Password'] == $password || $_POST['Username']== $username) {

header('Location: http://www.yourdomain.com/path/to/membersarea');
}
else {
  print('Wrong username or password. <a href="javascript:history.go(-1)">Please try again.');
}

?>
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Grat one! B-)
 
0
•••
Thanks lol... Told ya.. very very, well.. very very very very simple :lol:
 
0
•••
Very Very Very Very Simple :). When are you going to release the simple log in script, and the not so simple one :lol:
 
0
•••
i am looking for a login script which can be placed on main page of my site and would login the users on the forums also. You got one of those in ur pockets?
 
0
•••
So simple I even said grat instead of great :o oops ;)
 
0
•••
Indeed, very simple.. :)
Thanks for writing!
 
0
•••
This really works!
 
0
•••
its simple. havent tried it yet. but howd you secure the members area ? :P
 
0
•••
nice and easy yes but not very secure

i would try to encorporate some kind of encryption on those passwords.
 
0
•••
This method only has one user id and pw, rather than individual ones for each member. Since it's not very secure, why not simply use a secure folder, created from your control panel or .htaccess?
 
0
•••
Yes, it is not secure. And only allows one id and pass.. Like I said, very very very simple ;) I'll get into everything else later...
 
0
•••
killerid said:
i am looking for a login script which can be placed on main page of my site and would login the users on the forums also. You got one of those in ur pockets?


what forum software are you using?
 
0
•••
0
•••
0
•••
Code:
<?
$user1 = "user1";
$pass1 = "pass1";
$user2 = "user2";
$pass2 = "pass2";
if ($user == $user1&&$pw == $pass1)
{
   header("Location: http://website.com/area/user1");
}
if ($user == $user2&&$pw == $pass2)
{
   header("Location: http://website.com/area/user2");
}

  else
{
   print("Wrong username or password. Please try again.");
}
?>

Just keep adding users and if statements
 
0
•••
... or use MySQL <_<
 
0
•••
if i knew how to input users and passwords :)
 
0
•••
$query = "INSERT INTO tablename VALUES('$username', '$password')";
mysql_query($query);

that's a very simple input thing for ya - you'll need to put the stuff in VALUES() in order of the columns of the table...
 
0
•••
Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back