i have i config.ph page that l use so i can put all the database login information and the title of the website so it can be changed very simply. Now i have a dbconnect.php page that has to connection script in it
The below code is config.php
<?php
/****** Installation ******/
$sitetitle = 'AusFamily.com' ; // Website title
/****** Database ******/
$cfgServerHost = 'localhost'; // MySQL hostname
$cfgServerUser = 'shirvo'; // MySQL user
$cfgServerPassword = '137879'; // MySQL password
$cfgDbDatabase = 'shirvo_ausfamily'; // MySQL database name containing phpSecurePages table
$cfgDbTable = 'user'; // Where all the information is stored
?>
The below code is dbconnect.php
<?
include('config.php')
$conn = mysql_connect($cfgServerHost, $cfgServerUser, $cfgServerPassword);
if (!$conn) die('Error connecting to server!');
mysql_select_db($cfgDbDatabase , $conn) or die('Error selecting database');
?>
Ok now when l use me website is comes up with this;
Parse error: syntax error, unexpected T_VARIABLE in /home/shirvo/public_html/dbconnect.php on line 6
line 6 is this;
$conn = mysql_connect($cfgServerHost, $cfgServerUser, $cfgServerPassword);
so i am thinking that the $cfgServerHost, $cfgServerUser, $cfgServerPassword are not getting through
Anyone please help ASAP