La query data a mysqli_query() non riesce e restituisce false .
Inserisci questo dopo mysqli_query() per vedere cosa sta succedendo.
if (!$check1_res) {
printf("Error: %s\n", mysqli_error($con));
exit();
}
Per ulteriori informazioni:
https://www.php.net/manual/en/mysqli.error .php