Quote:
Originally Posted by Keewee6 mysql_connect("localhost", "squarebar", "square462") or die(mysql_error());
mysql_select_db("squarebar_db1") or die(mysql_error()); |
It is also better to put your db connection in a separate file and include it on your working pages.
like this
PHP Code:
$host = 'localhost';
$user = 'squarebar';
$pass = 'square462';
$db = 'squarebar_db1';
$con = mysql_connect($host, $user, $pass) or die('ERROR: I Cant find the database!');
mysql_select_db($db) or die('ERROR: still Cant find it fix my db config file!');
in your working page do an
include('config.php');
If your Data base ever changes you will only need to make changes in one place