SHARE
TWEET

Untitled

a guest May 30th, 2017 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. //Database Information
  4.  
  5. $dbhost = "localhost";
  6. $dbname = "quicksco_leader";
  7. $dbuser = "quicksco_hitch";
  8. $dbpass = "123abc";
  9.  
  10. //Connect to database
  11.  
  12. mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
  13. mysql_select_db($dbname) or die(mysql_error());
  14.  
  15. session_start();
  16. $username = $_POST['username'];
  17. $password = ($_POST['password']);
  18.  
  19. $query = "select * from users where username='$username' and password='$password'";
  20.  
  21. $result = mysql_query($query);
  22.  
  23. if (mysql_num_rows($result) != 1) {
  24. $error = "Bad Login";
  25.     include "login.html";
  26.  
  27. } else {
  28.     $_SESSION['username'] = $username;
  29.     include "memberspage.php";
  30. }
  31.  
  32. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top