[eluser]jedd[/eluser]
Hi mohsen and welcome to the CI forums.
What is going wrong with this code that you have posted here?
It is easier for us if you describe:
a) what you are trying to do
b) what you have done so far
c) what you expect will happen
d) what actually happens (or 'what goes wrong')
You have done 75% - which is great - but the last bit is the most important!