Others may have time to help more directly but I can recommend:
a) Looking at the Moodle source code
b) Sites like http://phpbuilder.com/ and http://www.devshed.com/Server_Side/PHP/
General developer forum
need help programming in php
This discussion has been locked so you can no longer reply to it.