Advertisement
Guest User

Untitled

a guest
Jun 15th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1.     function admin_check_countRows($username,$password) {
  2.         $query = "SELECT * FROM adminpanel WHERE username=? AND password=?";
  3.         include '../mysqlsettings.php';
  4.         $con = mysqli_connect($mysqlhost,$mysqluser,$mysqlpass,$mysqltable) or die ('No connection');
  5.         $stmt = mysqli_prepare($con,$query) or die("Invalid query");
  6.         mysqli_stmt_bind_param($stmt,'ss',$username,$password);
  7.         mysqli_stmt_execute($stmt);
  8.         mysqli_stmt_bind_result($stmt,$count);
  9.         mysqli_stmt_fetch($stmt);
  10.         mysqli_stmt_close($stmt);
  11.         return $count;
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement