Headline

setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "

Connected successfully

"; echo "List the contents"; } catch(PDOException $e){ echo "Connection failed: " . $e->getMessage(); } echo "

Hello world

" ?>