Guest User

Untitled

a guest
Sep 22nd, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. $connect = mysqli_connect("localhost","root","","CSDL");
  2. mysqli_query($connect,"SET NAMES 'UTF8'");
  3.        
  4. if ($_SERVER['REQUEST_METHOD'] == 'POST'
  5.     && !empty($_POST['userp'])
  6.     && !empty($_POST['passp']) )
  7.    {
  8.     ‎$user = mysql_escape_string($_POST['userp']);
  9.     $pass = mysql_escape_string($_POST['passp']);
  10.  
  11.     $select_mem = " SELECT *
  12.                 FROM user
  13.             WHERE user_name='$user' AND pass='$pass'";
  14.  
  15.     $query_toMem = mysqli_query($connect,$select_mem);
  16.  
  17.     echo mysqli_num_rows($query_toMem);
  18.   }
Add Comment
Please, Sign In to add comment