Do you remember My question "password protection".
I think there is a point we should improve this script.
Because this script isn't save at all. If someon know the URL of protected page, then he or she doesn't need password and username to go to that page , right. He or she can type then url on the location and get the page.
How to really protect the page like server does (.htaccess).
and using perl script ?