Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Antonia

  • Rank
  1. Just noticed I posted this in the wrong section :s Should have been in the "PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)" section.
  2. Ok, thanks Larry. I think I have sussed it and have attached the code so others can learn from it. Placed on every page that needs protecting and it appears to work very well // If no session variable exists, or unauthorized user_level, redirect the user: if (isset($_SESSION['user_id'])) { // if a valid user session is found then the user level is checked, if the // user has level 3 access they will be granted access if not a access denied //message be displayed and the user will be redirected. if ($_SESSION['user_level'] == 3) {} else { header("Refresh: 3; url=index.
  3. Hello, I have been following the book and have set-up a login system but my only problem is even if users are not logged in if they manually type the name of a page it will load. There is references in the book to restrict access but no examples, I have my links in the footer with user level control and that works fine. I have tried to restrict pages from loading but I have not been successful yet. Any help would be nice. ~Antonia
  • Create New...