I'm getting the error Fatal error: Uncaught Error: Call to a member function bind_param() on boolean
. I have tried all I know, and I cannot get it to work. This is what I have so far:
$db = "THIS IS CORRECT, TRUST ME. I HAVE TESTED IT :)";
$team = mysqli_real_escape_string($db, $_POST['team']);
$sqlcheckteam = $db->prepare("SELECT teamnum FROM teams WHERE teamnum=?");
$sqlcheckteam->bind_param('s', $bindteam);
$bindteam = $team;
$sqlcheckteam->execute();
The weird thing is that it works on my localhost server, but not on my actual server.
Any help would be appreciated.
If this has anything to do or helps, I'm using PHP 7.1.2
If I could get help with uploading this, it would be great :)
$nickname = mysqli_real_escape_string($mysqli, $_POST['nickname']);
$email = mysqli_real_escape_string($mysqli, $_POST['email']);
$passcreate = password_hash($_POST['password'], PASSWORD_DEFAULT);
$sqlinsertteam = $mysqli->prepare("INSERT INTO teams(teamnum, teamname, email, password) VALUES(?, ?, ?, ?)");
$sqlinsertteam->bind_param("ssss", $bindteam, $bindnickname, $bindemail, $bindpassword);
$bindteam = $team;
$bindnickname = $nickname;
$bindemail = $email;
$bindpassword = $passcreate;
$sqlinsertteam->execute();