Just mess around with your premade scripts. Any thing I learned about php is from finding something someone else made, then making it fit my needs, and as you hit a roadblock or gap in your knowledge use php.net to help and then eventually you don't need anyone elses code for a base or framework.