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