Wrox Programmer Forums
|
BOOK: Dreamweaver MX: PHP Web Development
This is the forum to discuss the Wrox book Dreamweaver MX: PHP Web Development by Gareth Downes-Powell, Tim Green, Bruno Mairlot; ISBN: 9780764543876
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Dreamweaver MX: PHP Web Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2005, 10:56 PM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with chapter 9

OK, I've gotten everything to run except the creat_users.php when the restict access block is added. I'm using the code I downloaded from this site, changed the MySQL info for my server and when I login and try to go to the create_users.php it sends me back to the menu.php page. I'm not sure where the error is.
This is the code block :
<?php
    session_start();
    // Check the Users status, if not Admin level
    // redirect back to the menu.php page
    if($HTTP_SESSION_VARS["statusCheck"] != "Admin")
        header("Location: menu.php");
?>

and here is the code block that creates the session on the login page.

<?php
    // This section is only run when the form has been submitted
    if($HTTP_POST_VARS['Submit']=="Login"){
        session_start();
        // Check whether the login details are correct, and put
        // the user status into a session variable.
        $statusCheck = check_login($HTTP_POST_VARS);
        if ($statusCheck == "Admin" || $statusCheck == "Staff"){
            session_register("statusCheck");
            header("Location: menu.php");
            }
    }
?>
thanks. Liked the book by the way.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
chapter 7 - chapter 11 pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 January 6th, 2008 11:40 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.