Hi,
I create dbf.php file to connect database and require dbf.php in main.php but, doesn't work.
Thanks
dbf.php
<?php
$conn = mysql_connect('localhost', 'root', '');
if (!$conn) {
die('Could not connect: ' . mysql_error());
} else {
mysql_select_db('dbf', $conn) or die('Could not select database.');
}
?>
main.php
<?php require '../dbf.php';?>