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.