May 25th, 2011, 06:31 PM
Join Date: May 2011
Time spent in forums: 38 m
Reputation Power: 0
Database not connecting - Wamp Server
I got to develop my whole database in Wampserver 2.1 (it's the latest set). But now I cannot connect to MySQL through PHP in Wamp. I have searched a lot but still have no clue as to what is causing problems.
No errors are being displayed. I have tried a number of code combination including "if(!)" and nothing has worked.
CAN ANYONE HELP PLEASE.
Here is the current code I am trying which returns blank page:
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'xyz';
$db = 'scorecard';
$conn = mysql_connect($dbhost,$dbuser,$dbpass);
die('Could not connect: ' . mysql_error());
echo 'Connected successfully';