Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


what does the mysqli error expects parameter 1 to be mysqli null given mean


what does the mysqli error expects parameter 1 to be mysqli null given mean  using -'php,mysql,mysqli'

I have this PHP page:

<?php

//$_GET['invite'] = kNdqyJTjcf;

$code = mysqli_real_escape_string ($dbc, $_GET['invite']);

$q = "SELECT invite_id FROM signups_invited WHERE (code = '$code') LIMIT 1";
$r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc));

if (mysqli_num_rows($r) == 1) {
    echo 'Verified';
} else {
    echo 'That is not valid. Sorry.';
}

?>


This is returning the error Warning: mysqli_error() expects parameter 1 to be mysqli, null given.

Any idea why?
    

asked Oct 13, 2015 by amit.gupta
0 votes
2 views



Related Hot Questions



Government Jobs Opening


...