Tutorials Navigation

Tutorials :: New :: Popular :: Top Rated

Tutorials: 18,357 Categories: 12

Total Tutorial Views: 42,394,019

Simple PHP login Script

Tutorial Name: Simple PHP login Script  

Category: PC Tutorials

Submitted By: Ella

Date Added:

Comments: 0

Views: 2,198

Related Forum: PC Building Forum

Share:

Okay this is a basic login script that I coded.
It took about 5-10 minutes to code...

[ Register or Signin to view external links. ]

okay to set it up you need to hash a username and a password.

Use this link
[ Register or Signin to view external links. ]
now enter the hashes in at
$user
and
$pass
then edit $self

or just edit lines 20, 21 and 22


<style type="css/text">
textarea
{
font-family: Courier New, Courier, monospace;
font-size: 14px;
color: #000000;
border:double;
border-color:#3C3C3C;
background-color:#60D5C9;
}
hr
{
background-color: #33CCCC;
}

</style>
<?php
$passe = md5($_POST['passentry']);
$usere = md5($_POST['userentry']);
$self= 'http://thefinalstring.com';
$pass = '81dc9bdb52d04dc20036dbd8313ed055';
$user = '81dc9bdb52d04dc20036dbd8313ed055';
?>
<center>
<body text=#336666 bgcolor="#0000000" style="font-family: Courier New, Courier, monospace;
font-size: 18px;" oncontextmenu="return false;">
<form method="post">
Username:<input type="text" name="userentry" /><br>
Password:<input type="password" name="passentry" /> <br>
<input type="submit" value="Login" name="Login" />
</form></center>
</body>
<?php
echo base64_decode("PGNlbnRlcj48Zm9udCBjb2xvcj1cInJlZFwiPiBDUkVBVEVEIEJZIE5FUk8gQCA8YSBocmVmPSJod
HRwOi8vdGhlZmluYWxzdHJpbmcuY29tIj4gVGhlIEZpbmFsIFN0cmluZyEgPC9hPjwvZm9udD48L2NlbnRlcj4NCg==")
;;
?>
<?php

if (isset($_POST['Login']) && $passe===$pass && $usere===$user )
{
header('location:'.$self);
}

if(isset($_POST['Login']) && $passe== " ")
{ echo "<br><font color=red><b>Please enter a password</font></b><br>"; }

if (isset($_POST['Login']) && $usere== " ")
{
echo "<br><font color=red><b>Please enter a username</b><br></font>";
}
?>

Ratings

Current rating: 3.00 by 5 users
Please take one second and rate this tutorial...

Not a Chance
1
2
3
4
5
6
7
8
9
10
Absolutely

Comments

"Simple PHP login Script" :: Login/Create an Account :: 0 comments

If you would like to post a comment please signin to your account or register for an account.