I have looked at our posts regarding this problem, however, the posts just suggest to use mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT) instead of error_reporting(E_ALL). I have made these changes which indeed removed the error message, but now nothing appears on my webpage, it is just a blank white page, even though it has a few forms on it. So i started using error_reporting(E_ALL) once again
I was wondering if there is another reason for this error. It is a simple select statement that is causing this problem, The php file consists of 4 forms and has a insert on duplicate key statement just before it.
$prod_sel = $dbc->query("SELECT * FROM Product");
$prod_sel->data_seek(0);
while ($output = $prod_sel->fetch_assoc()) {
$prod_run .= $output['Product_Name'] . '<br>';
$_SESSION['Product_Name'] = $output['Product_Name'];
}
//session_start does not work here
print "Restaurant is :" . $_SESSION['Product_Name'];
$prod_sel->free();
$prod_sel->close();