I was posting my last reply as you were. Thanks, I will try that if I can figure it out. I did read your suggestion on a previous post and had trouble figuring it out.
On the subject, are there any security issues I should know about? I ask because in my searches, I came across a couple of people who warned newbies that if they didn't set this type of scandir or unlock up correctly, it opened them up to someone from outside the server, deleting all their files. Have you heard of this?
I can't find the reference now, but it had something to do with using .. or / in your code.