Dear Sir,
I have already done a similar project for a company in india. i can delivere you the complet source code in php or in cgi if you want.
You will become also an installation file, you dont need to make more than 3 changes in 3 lines:
(MySQL-Database name, MySQL-Database user, and MySQL-Database password).
The two scripts are ready to use.
I can give you the php script for only $15
best rregards
moussa (from germany)