I was successfully able to solve the problem, the problem was that I had not set the value of lastvisit in the session object which I had created..
once i did tht the problem was resolved
t [originally posted on jforum.net by anilhk]
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad: