Advertisement
Guest User

Untitled

a guest
Apr 6th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. <?php
  2. $message="";
  3. if(count($_POST)>0) {
  4.     $conn = mysqli_connect("kunet","k1639600","papaya","db_k1639600");
  5.     $result = mysqli_query($conn,"SELECT * FROM user WHERE username='" . $_POST["username"] . "' and password = '". $_POST["password"]."'");
  6.     $count  = mysqli_num_rows($result);
  7.     if($count==0) {
  8.         $message = "Invalid Username or Password!";
  9.     } else {
  10.         $message = "You are successfully authenticated!";
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement