Tuesday, 27 August 2013

Define Connection Variable in php

  // Define database connection constants
define('DB_HOST', 'localhost');
define('DB_USER', 'hemanjosko');
define('DB_PASSWORD', 'password');
define('DB_NAME', 'database-name');
?>connect.php
-------------------------------------$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

you may include this to anywhere, where you want to add the connection of php to mysql

0 comments:

Post a Comment

Products :