Quote
Fatal error: Call to a member function bind_param() on a non-object in newAccount.php on line 63
Now the weird thing is, when I run the same script locally, it works. Any thoughts?
This is the code that is having the problem:
if (count($errors) == 0) {
// no errors have occured so apply sha1 to passwords
$pwd = sha1($pwd);
$pwdConfirm = sha1($pwdConfirm);
// submit to database
$sql = "INSERT INTO users (user_name, user_pwd, user_regdate, user_country, user_email, user_activated, user_points, user_levelid, activation_key) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?);";
$stmt = $dbConn->prepare($sql);
// bind the variables to the prepared statements replacing the ? marks
$stmt->bind_param("ssiissiis",$userName,$pwd,$regdate,$country,$email,$activated,$points,$levelId, $activateKey);
$activated = "0"; // not yet activated
$points = 0;
$levelId = 0; // level id 0 means the user is a normal user without admin permissions
$activateKey = makeKey();
$stmt->execute();
$message = "$userName has been registered. You may now login.<br />";
}
Any thoughts?


Sign In
Create Account


Back to top









