Don, I do not fully understand php but I speed read and I can break down a problem to find a solution. I just found this url could be useful to you
http://php.weblogs.com/discuss/msgReader/$537?mode=day
copy and paste that url into your browser it will take you to the right place, if you click on it due to this board script dosnt like the url posted it takes you to the wrong page i wannted to show you.
......
okay read up some more and i am sure this is what you need to review..