Due to the nature of the material on my e-shop, I have a disclaimer at the beginning of the store (the actual store is in a subdirectory from the root directory) that people have to click through before entering. However, since google has indexed the site, I want to make sure people see the disclaimer before hopping on in.

To solve this problem, I figured I would use cookies to do the trick. The front page (with disclaimer) is an html page with a simple yes or no hyperlink. Well, there's more text than that but let's keep it at that for simplicity. Clicking yes to enter will send a value to the next page...which would be the store's index.php page:

./shop/index.php?input=some_value

That value is transmitted to the index.php page and a check is made to see that a value was sent to the page. If it is true, a cookie is set to allow the user regular access. If the user dropped in via a specific link to a product or section of the site and thus has not had the chance to send a value to index.php, the check will not set a cookie and send the user back to the beginning.

This sound straight forward and all, but I'm not sure how I would do the redirection if in the second situation. I guess because of what is loaded prior to getting to the index page, I can't use the header() function for redirection as it's already been called...or something like that. Unfortunately, my weak php skills is not helping me here. Is there another way to accomplish this?

Chris