
May 25th, 2011, 06:33 PM
|
Registered User
|
|
Join Date: May 2011
Posts: 3
Time spent in forums: 38 m
Reputation Power: 0
|
|
Mysql & other databases - Database not connecting - Wamp Server
Hi
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:
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'xyz';
$db = 'scorecard';
$conn = mysql_connect($dbhost,$dbuser,$dbpass);
if (!$conn)
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
?>
|