November 18, 2013

How to run php to connect to mysql on debian web server

I having trouble writing the right script to connect my website to a SQL database they are both on the same server I was just wondering if there any suggestion that I could get on the script that I'm trying to run. I took out the password on purpose
$db_host = "";
$db_username = "root";
$db_pass = "blank";
$db_name = "test";

@mysql_connect ("$db_host","$db_username","$db_pass") or die ("could not mysql");
@mysql_select_db("$db_name") or die ("no database");

echo"Sussecful Connection";

the problem that I am running into is that I don't get anything telling me if it connected or not

Click Here!