PHP: Restrict access to a section of code

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default PHP: Restrict access to a section of code

    hi guys,

    I have implemented the login/user auth sections of my webby without any
    problems. Ive used the built in server behaviours in DW8. So i have a session
    variable called MM_username.

    now instead of restricting access to a whole page, i just need to restrict
    access to certain sections inside a page. For example i have a user admin panel
    that i only want to show if they are logged in. and i only want the logout
    button to show if they are logged in etc.

    im not great at hand coding php yet , so any help would be greatly appreciated.

    thanks,

    ted.

    tedrodgers Guest

  2. Similar Questions and Discussions

    1. Restrict access by ip
      I have an ASP page that I want to allow access from only from a certain block of address, can someone get me started?
    2. SECOND restrict access
      I have built several databases in MySQL, in one is a table that has all the log-on information that keeps the administration side of the site...
    3. how do I indentify which section of code is slow?
      I have a query that loops over several CFIF statements. The page seems to be rendering too slow. Is there a way where I can put some code around...
    4. Restrict Access with Levels
      I set up my login page to restrict by username, password, and access level. I restrict access to "Admin" on one of my pages. However, when I submit...
    5. How can I keep a section of code from firing?
      I am wondering if I am attempting the impossible on one page. CODE: set current= cConn.Execute(SQLCurrent) Do Until current.eof Response.Write...
  3. #2

    Default Re: PHP: Restrict access to a section of code

    On 09 Jun 2006 in macromedia.exchange.extensions.dreamweaver,
    tedrodgers wrote:
    > I have implemented the login/user auth sections of my webby without
    > any problems. Ive used the built in server behaviours in DW8. So i
    > have a session variable called MM_username.
    >
    > now instead of restricting access to a whole page, i just need to
    > restrict access to certain sections inside a page. For example i
    > have a user admin panel that i only want to show if they are logged
    > in. and i only want the logout button to show if they are logged in
    > etc.
    <?php if($_SESSION['MM_username']) { ?>
    <!-- HTML code you want displayed goes here -->
    <form name="logoutform" method="POST" action="logout.php">
    <input type="submit" name="Submit" value="Log Out">
    </form>
    <?php } ?>

    [url]http://www.php.net/manual/en/ref.session.php[/url]

    --
    Joe Makowiec
    [url]http://makowiec.net/[/url]
    Email: [url]http://makowiec.net/email.php[/url]
    Joe Makowiec Guest

  4. #3

    Default Re: PHP: Restrict access to a section of code

    On 09 Jun 2006 in macromedia.exchange.extensions.dreamweaver, tedrodgers
    wrote:
    > hi guys,
    By the way: you'd be much better off in the macromedia.dreamweaver or
    macromedia.dreamweaver.appdev groups; this group is fairly low volume.

    --
    Joe Makowiec
    [url]http://makowiec.net/[/url]
    Email: [url]http://makowiec.net/email.php[/url]
    Joe Makowiec Guest

  5. #4

    Default Re: PHP: Restrict access to a section of code

    oops i meant to put it in appdev :) thnx
    tedrodgers Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139