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 trial
aduratomi okiji
2,561 PointsWhat is wrong with my code
Hi, I am currently taking "using php with mysql" course and i am having trouble making the PDO object in XAMP. my code is as the following. ' $db = new PDO("mysql:host=localhost;dbname=shrits4mike;port=3306","root","root");'. Everything for the database is on its default setting. Please provide an asnwer to my question. Every time I run this code it give man exception.
2 Answers
Charles Gray
19,470 Pointsdb is database, anytime you use a database you have to have a very specific location...name, table, password ect..
Charles Gray
19,470 Pointsetc. sorry