When I run this query from PhpMyAdmin it works but when it's a prepared statement it doesn't work. The problem is with the date and the column type is date because I want only one row for each date in this table.
$q = "INSERT INTO I_Counts (count_date, morning_1, morning_2, morning_3) VALUES (NOW(), ?, ?, ?)";
$stmt = mysqli_prepare($dbc, $q);
mysqli_stmt_bind_param($stmt, 'iii', $mb1, $mb2, $mb3);
Warning: mysqli_prepare() expects parameter 1 to be mysqli, null given in /home/advice10/public_html/astuff/enter-morning.php on line 92
A system error occurred. We apologize for the inconvenience.
Notice: Query: INSERT INTO I_Counts (count_date, morning_1, morning_2, morning_3) VALUES (NOW(), ?, ?, ?)
MySQL Error: in /home/advice10/public_html/astuff/enter-morning.php on line 94