that is a big function

.. i found out when i deployed this project where i set the entry page in a cookie because the user gets directed to another domain if they are not logged in. tested on linux, deployed on win, same version =/
i could have sworn i posted this in PHP, .. i must be losing it.
good code examples, looks like you've been through this before

i'm glad they fixed it in php5.