Please help! I'm a total n00b at PHP/MySQL and am trying to learn it.
XAMPP has been a great help in getting me to the point where I can run PHP scripts on my local machine. Unfortunately I have no idea how to get PHP to talk to a MySQL database. I copied a sample .sql file into my site's root folder (which I also hear is a bad idea for security reasons - is this true?) and tried to run a PHP script from a tutorial I'm following. Well it didn't give any errors, but none of the data from the database was returned, so obviously it's not working. And if I'm not supposed to put .sql files in the root folder, then where?
It's been surprisingly difficult to find tutorials on how to do this and I am quite frustrated. The PHP tutorial I'm following is helpful but it foolishly assumes the user already knows how to set up PHP and MySQL and to get them to communicate...
Any help would be much appreciated!