Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialchristynunnally
4,982 PointsPHP results not showing in console
I am on the first video of using CRUD with PHP. Trying to do a var_dump and connect to the database. My console is not showing any results. Any ideas why?
christynunnally
4,982 PointsHi Algirdas Lalys,
Thanks for your help. Unless I am missing a syntax, I have typed exactly what is in the video at https://teamtreehouse.com/library/connecting-to-the-database-2
Here is my code:
<?php
$db = new PDO("sqlite:".DIR."/database.db"); var_dump($db);
christynunnally
4,982 PointsSorry....figured it out. Thought Workspaces would do automatic saves. Clicked "File/Save" and works perfectly.
Algirdas Lalys
9,389 PointsCool you have figured it out:) Well done. Yap in workspaces you do have to save. You can use keyboard shortcut as well (CTRL + S)
Algirdas Lalys
9,389 PointsAlgirdas Lalys
9,389 PointsHi,
Could you paste your code, it's difficult to say what is wrong:)