I recently Installed Redhat 9, and am new to php and mysql. I read some tutorials and set up an account in mysql and created a database. I can't connect to it no problems from mysql command line, but when i use php i get errors. Is there anything specfific to redhat that i have overlooked? any help would be greatly appriciated...
the code i used to try and connect to mysql is
<html>
<head>
<title>Connect To Sachnet Database</title>
</head>
<body>
<?
DEFINE (HOST, "localhost");
DEFINE (USER, "user");
DEFINE (PASSWD, "pass");
DEFINE (DB, "database");
$linkID = mysql_pconnect (HOST, USER, PASSWD);
mysql_select_db (DB, $linkID);
$result_id = mysql_query ("CREATE TABLE customer(customerID INT(8),
firstname CHAR(30), lastname CHAR(30))", $linkID);
if ($resultID != FALSE)
{
print "The query was succesfully executed.";
}
else
{
print "The query was not successfully executed.";
}
msql_close($linkID);
?>
</body>
</html>
i have obviously taken the real user pass * out of script