T33
10-14-07, 02:44 AM
I have been trying to run a simple query via a php script to show records in my MySql db on powwebs' server; however, I think there may be a problem with the php script (see below) because when it is executed to login to my DB it shows no messages just a blank web page. Can someone give me the sysntax needed at the start of my php script to login to my powweb database? Is there a simple php script I can use to test my connection to the database?
<? $hostname = "ammbc.powwebmysql.com"; // The Powweb DB server.
$username = "XXXXXX"; // The username you created for this database.
$password = "tYYYYY"; // The password you created for the username.
$usertable = "ZZZZZZ"; // The name of the table you made.
$dbName = "7777777"; // This is the name of the database you made.
MYSQL_CONNECT($hostname, $username, $password) OR DIE("DB connection unavailable");
@mysql_select_db( "$dbName") or die( "Unable to select database");
?>
<? $hostname = "ammbc.powwebmysql.com"; // The Powweb DB server.
$username = "XXXXXX"; // The username you created for this database.
$password = "tYYYYY"; // The password you created for the username.
$usertable = "ZZZZZZ"; // The name of the table you made.
$dbName = "7777777"; // This is the name of the database you made.
MYSQL_CONNECT($hostname, $username, $password) OR DIE("DB connection unavailable");
@mysql_select_db( "$dbName") or die( "Unable to select database");
?>