Data is stored on a remote DB which checks the license number of the person with the script, if it matches it allows access to run the script in the DB. For instance if you called to Add a Page to your CMS then the internet address would be something like www.yoursite.com/cms/file.php?functid=100294, it would check that you were allowed to do this within your license rights and then give the file the script needed to add a page. Because I am running the mysql_query, mysql_fetch_array, functions often I thought making a function would be easier and save code. As I said, I am new to functions, so I don't really know how to best use them. To me they don't seem very flexible and I don't understand how people can run whole sites off them. If anyone knows a good tutorial on OOP that would be greatly appreciated, one with real applications, for instance ecommerce example based.