I'm all for the purpose of these fourms of getting help... HOWEVER; unless I am mistaken - it sounds like you are actually trying to get someone to write the script for you!
You should really try writing the script yourself and reading up on manuals in www.php.net
and then when a script will not work, post it here and you will get quicker responses so that people can identify your mistake and help fix it - rather than writing the whole thing themselves.
I have learnt leaps and bounds from these forums by posting my silly mistakes and others gladly helping and showing me easier ways to do things... but I would not have a clue if it wasn't for my own trial and error and research also.