just a tip, if your not too hot on writing
php go to
http://www.hotscripts.com and look at the free scripts available for download, chances are youll find what you need and will only have to make a few changes to the configuration files, most come with read me files and step by step set up txt files