I was just wondering what the deal is with selling php and/or MySQL scripts that I have written? Can I sell them multiple times? For example if I write a simple script like a contact form I could sell/give to all the sites I design right? But lets say I were to write a more complex script that could be used by different sites, am I allowed to sell the same script to multiple people?
Provided that the scripts contains all of your code, you can sell the scripts as many times as you wish, and for as much as you like. If, however, your script contains someone else's code, you will be bound to their license agreement. For example, if you have open source code within it, you may only be able to charge a distribution fee (unless you seperate it).
Just be careful that you don't get caught by work for hire clauses. If someone hires you to write code for them be sure that you have some form of confirmation before hand that they are paying for the product not for the labor. If they paid for the labor then they own the fruits of that labor.