I hate to ask this question but I have searched and searched and done all sorts of things to see if I can resolve on my own.
Call to a member function bind_param() on a non-object
var_dump = bool(false)
$stmt = $mysqli->prepare("INSERT INTO resetPswd (userID,key,date,status) VALUES (?,?,NOW(),0)");
$stmt->bind_param('is', $userID,$key);
$stmt->execute();
I have removed everything then added all back the problem lies with "key", it works until I add that in.
I am creating a random 'key':
$key = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
db = key - varchar(12)
Any help would be great! Why am I using mysqli? It's required.