I honestly learned PHP by using wampserver to run a pbbg script.
After I got things set up, I started making random small changes to the code just to see what things did.
Trial and error my friend, and trust me...there were lots of errors..it takes a LOT of time and ever more patience to learn PHP, and mysql, but once you get it down it's a breeze.
I used PHP.net as a reference a lot, as well as w3schools. Both are helpful.
If you want my recommendation on what script to use, mccodes lite. It is free, it is small so you won't get lost in the pages, the code is pretty self explanatory once you gain a minimal understanding of how things work, and lots of successful games have been created with the mccodes engine. You will learn how to connect your script to a database as well as executing queries and a few simple server side commands. Plus lots of good functions to get the ball rolling on seeing how things work.
I believe it's in the downloads section here
