chapter 12, can't set up tables
I am doing this on a remote mysql, I copied everyting exactly from the download for this book but I can't get the cmstables.php to run. here is my conn.php:
<?php
define('SQL_HOST','localhost');
define('SQL_USER','xxxx');
define('SQL_PASS','xxxx');
define('SQL_DB','com_contact');
$conn=mysql_connect(SQL_HOST,SQL_USER,SQL_PASS)
or die ('Could not connect to the database; ' . mysql_error());
mysql_select_db(SQL_DB,$conn)
or die ('Could not select database; ' . mysql_error());
?>
now when I set up the database on my server it said this is my php connection string:
$dbh=mysql_connect ("localhost", "xxx", "xxx") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("com_contact");
and yes were all the x's are I replace them with my user name and password. I even took the above connection string and replaced
require_once 'conn.php'; with the above connection string and still nothing. I whent back into my phpadmin page checked the database called com_contact and nothing is in there, no errors just a blank page. Any suggestions?
|