If your new to php (like myself), you can find loads of tutorials. I found this one particularly good:
http://www.php-mysql-tutorial.com/
it seems to cover almost all the basics. I used another tutorial before this, but I wish I ahd found this one earlier - it is so much more detailed, as the author has
explained what is going on, rather than just saying "do this but dont do that".