Hi guys I need some help with this code, can't figure out why it isn't working.
and the error I am getting is:
Parse error: syntax error, unexpected '$sql' (T_VARIABLE), expecting catch (T_CATCH)
Thanks in advance.
Code:
try {
$db = new
PDO('mysql:host=localhost;dbname=boekenlijst','root','');
}
$sql = 'SELECT auteur FROM boekenlijst';
Parse error: syntax error, unexpected '$sql' (T_VARIABLE), expecting catch (T_CATCH)
Thanks in advance.
Comment