Re: Database error (More Details)
| From: | Mark Wiesemann | Date: | Mon, 08 May 2006 09:44:44 +0000 |
| Subject: | Re: Database error (More Details) | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23996@lists.php.net to get a copy of this message | ||
moses@softwaysolutions.com wrote:
require_once 'DB.php';
$dsn = 'mysql://root:@localhost/student';
$db =& DB::connect($dsn);
if(PEAR::isError($db))
{
die($db->getMessage()); }
echo "<br> Database Connected Sucessfully";
The code looks good.
This could be the problem. Looks like if every username would be accepted here. You can try this yourself via mysql on a shell. Regards, MarkTHE USER TABLE IN MYSQL contains the following users-----------------------------------------Host User password-----------------------------------------localhost root % rootlocalhost% -----------------------------------------