Advertisement
Guest User

Untitled

a guest
Jan 19th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. session_start();
  3. error_reporting(0);
  4. include("../config.php");
  5. $conn = new mysqli($hostname, $username, $password, $db_name);
  6. $query = mysqli_query($conn,"SELECT * FROM `Administrators` WHERE username = '" . $_POST["usernamep"] . "' AND password='". md5($_POST["passwordp"]) . "'");
  7. if(mysqli_num_rows($query) > 0){
  8. $_SESSION["username"] = $_POST["usernamep"];
  9. header("Location: dashboard.php");
  10. }else{
  11. header("Location: index.php?alert");
  12. }
  13. ?>
  14.  
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement