PHP can't connect to MySQL
I've been trying to connect to MySQL throught PHP but it doesn't work. When a bring up the page everything from the begining <?php and down doesn't show.
<?php
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
if ($db = mysql_connect ('localhost', 'mysql', 'password'))
{
print '<p>Connected to MySQL</p>';
mysql_close();
} else {
print '<p>Couldn't connect to MySQL</p>';
}
?>
Subject
Written By
Posted
PHP can't connect to MySQL
June 29, 2005 12:37PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.