OK, I feel bad a little bit for not being slightly more diplomatic and polite since you appear to be new to this forum. The point is that forums like this one work more or less this way: you do a bit of research first (which is usually a lot of googling), then you try to code a bit, and when yu get stuck prepare a concise and focused question(s) and post it here along with corresponding parts of your code. If you do it this way I am sure other members will be more than happy to post solutions here in short time. So please have look the link in my previous post, try to do a basic script and then tell us where you have problems.
YOu dont even bother to open the link which has been given in responce to your question.YOu should have gone through it .This will give negative image to you on daniweb.Without even opening the link you try to get a prepeared answer.Please go through the sticky given to you read that .