php
DEFINE('DB_USER', 'root') ;
DEFINE ('DB_PASSWORD', '' ) ;
DEFINE ('DB_HOST', 'localhost') ;
DEFINE ('DB NAME', 'ljke233' ) ;
// Make the connection.
$dbc = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
OR die ('could not connect to MySQL: ' . mysqli_error () ) ;
?>
Warning: Undefined variable $dbc in /var/www/html/ict301/001/ljke233/assignment10/index.php on line 13
Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, null given in /var/www/html/ict301/001/ljke233/assignment10/index.php:13
Stack trace:
#0 /var/www/html/ict301/001/ljke233/assignment10/index.php(13): mysqli_query()
#1 {main}
thrown in /var/www/html/ict301/001/ljke233/assignment10/index.php on line 13