Show your code and point to where it does not work the way you want it to. Also. at this point explain what you want to happen, how do you want the ocde to work for you.
So far you have not show us anything that you had done. Here are people who are willing and able to help others, but nobody here will do the work for you :-(
Have fun.
---- Andy