I have made modifications to allow php scripts in ezpages. Now I want to create a new page that is only available to members who are signed in. I have put the following code in to see if there is a session variable present. If so, I would like to show the page to the user. If not, I want the user to be redirected to the login page.
Here is the code I have at the very top of the page:
The results I'm getting:Code:<?php if (empty($_SESSION['customer_id'])) { header("Location: index.php?main_page=login"); exit; } else { /*here is the stuff that gets shown to the user */ } ?>
When I am logged in, I see all the content -> GREAT!
When I'm not logged in, the page is blank and I don't get redirected.--> BAD!
When I test the header() redirect in a test file in the Catalog directory, it works. Is this a permissions problem?
Any suggestions are appreciated. Thanks, D



