I have a problem in connecting to Xampp database.
I have tried the following but it didn't work.
db_conenction.php
- Code: Select all
<? php
//Define database connection constants
define ('db_host', 'localhost');
define ('db_un', 'root');
define ('db_psw', '');
define ('db_name', 'medocs');
?>
test.php
- Code: Select all
<?php
require_once('db_connection.php');
// Connect to the database
$dbc = mysqli_connect(db_host, db_un, db_psw, db_name);
........
When we visit test.php, i have the following error code:
Parse error: parse error in D:\xampp\htdocs\medocs\db_connection.php on line 3
May i know what went wrong.
Thanks for your time.