I have the following piece of code:
$query = "SELECT * FROM delegations where EMail='". $_REQUEST["user"] ."' AND Password = '". Encrypt($_REQUEST["pass"]) ."' ";
$results = mysqli_query($con, $query);
if(mysqli_num_rows($results) > 0) {
while($row = mysqli_fetch_array($results)) {
$_SESSION["login"] = $row["ID"];
echo "Welcome <b>" . $row["FirstName"] . "</b>! You have logged in succesfully! <a href=\"index.php\">Click here</a> to continue!";
}
Which runs fine when I run it on my localhost xampp. However, when I upload it to my web-server I get the following error code:
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result,
boolean given in *path*/login.php on line 28
Any suggestions?