I think you are learning one of the biggest lessons right now. You can't do much with only client-side scripting languages, you need at least one server-side language. I know you will come back in just five minutes with another request if I should write this script for you, so the best solution is for you learn PHP or any server-side language yourself because this is not going to be the last problem you will need PHP to solve. There are countless books on PHP out there, simply get one and you may finish it with just a month.
I joined this community the help me identify some of the flaws in the way I program and to learn better ways of doing what I already know. Simply put, I am here to learn and I believe you are here to learn too. So writing the script for you will mean I don't want you to learn and become who you want to be. I will help only if you start doing something yourself.
> k thanks. but can you just write the script??
No problem. My current rate is £100/hour, or if you want to pay in 'foreign' currency, the equivalent of £120/hour based on an agreed exchange rate. Minumum 5 hours work.
If you want it done for free, check out 'www.i_am_a_mug.com'. I think the site's closed now because they went bankrupt.