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

PHP Using PHP with MySQL Connecting PHP to MySQL Getting Started with PDO

PHP and MySQL

I can't seem to get this to work... http://imgur.com/yhddh4M Any idea what I am doing wrong?

3 Answers

Jason,

What is your var_dump showing you? Are you on a MAC or a PC? Are you sure your root user has a password?

I don't think it is showing me anything. At least when I load the above page, I get nothing. I am running a Mac. I don't know about the password. I am using the db that was set up by the SQL script in the sample documents supplied with the course work. I assumed since they said to use root as the password that was how they set it up.

Well when you setup MAMMP and MySQL for it it builds a localhost root user. Try leaving the password out, (the last root) just leave "" marks to designate its empty. Have you done the Database Foundations with Andrew Chalkley? If not it is an excellent source of information on the entire Database system I took it even though I knew SQL already and learned a lot of things from it.