Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*=========================
- Simple Login System
- ===========================
- Made by Winterpartys
- ===========================*/
- // Daniel Starnes Edit: 26/11/2010 approximately 7:42 PM.
- session_start();
- include "config.php"; //This contains the $row shizzle
- //Defines the users input when logging in.
- $username = $_POST["user"];
- $password = sha1($_POST["pass"]);
- //Defines the users input and uses it from the db.
- $dbusername = $row["name"];
- $dbpassword = $row["pass"];
- // Check to see if they match
- if ($username==$dbusername&&$password==$dbpassword){
- $add_coins = $row['coins'] + 3;
- mysql_query("UPDATE members SET coins = '$add_coins' WHERE name = '$username'");
- echo "<font face='Tahoma' size='2'>Thank you for signing in <b>$username</b>!<br>
- Another 3 coins have been added when logging in!
- <ul>
- <li><a href='index.php'>Procced..</a></li>
- </ul></font>";
- $_SESSION['username']=$username;
- } else {
- echo "<font face='Tahoma' size='2'>The password you entered is incorrect. <br><a href='index.php'>Go Back</a>.</font>";
- } else {
- echo "<font face='Tahoma' size='2'>The user that you specified does not exist. You may register this account by clicking <a href='register.php'>here</a>.</font>";
- } else {
- echo "<font face='Tahoma' size='2'>You must be logged in to view this page. To log in, please click <a href='index.php'>here</a>.</font>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement