What happened when you tried?
Type: Posts; User: Junky
What happened when you tried?
So the error occurs in the code you didn't originally post! Do you think posting relevant information would make it easier for us to help you?
When you want to do one thing or another what kind of...
Nowhere in your code do I see a print statement.