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
<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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…