I need some help here. I have some code below, and my question is, I'm not getting where the error is, which is showing by the error message.
try
{
$db = new PDO('mysql:host=localhost; db_name=softdemo','root', '');
}
catch(PDOException $e)
{
echo $e->getMessage();
}
try{
foreach ( $db->query("SELECT * FROM users") as row )
{
echo $row['username'].$row['password']."<br/>";
}
$db = null;
}
catch(Exception $e)
{
echo $e->getMessage();
}