usy1010: First off, you should never hijack an existing thread with an unrelated question. It is better to start a thread of your own.
More importantly, to both you and the OP, you have to understand that DaniWeb is NOT a free-homework-solving service. Simply posting a question as you both have done, without showing that you've made some effort to solve the problem, is a violation of the DaniWeb forum rules and the Terms of Service. If you have a problem with your own code, fine, we can give advice; but you have to show us your work. We are here to help you learn; We are not here to help you cheat.