Page 2 of 2

Posted: Wed Sep 03, 2003 10:30 pm
by Okanogan
I am not sure at this about the brackets.

I got it working with this:

// MYSQL CONNECT STRINGS
$db_user = 'aplus';
$db_password = 'password';
$db_database = 'aplus';
$db_server = 'localhost';
$db_table = 'table';

//CONNECT TO MYSQL
$db_conn = mysql_connect($db_server, $db_user, $db_password) or die(mysql_error());
print ("Connected successfully");


and I think it can even go like this with the double quotes.

$db_conn = mysql_connect("localhost", "mysql_user", "mysql_password")
or die("Could not connect: " . mysql_error());


I was just a bit confused trying to connect to one of the tables in the datbase.