How to create a menu variable for registered users?

I have 3 levels of access to my Web site.  Not connected connected (without restrictions), and administrator.  I want the menu to display the different options for each type of person.  How can I go about it through PHP?  A link to a tutorial step by step would be helpful, I could not find a...

For example, if you are not connected, I want the menu to display only the news and to register.  If you're connected, I want the menu to display "Info, my profile, logout" and the admin login to show "Info, my profile, Admin, disconnect" in the main menu.

The basic idea is the following:

If ($client_type == 'admin') {? >}

  • ADMINISTRATION
  • A MENU ITEM
  • But if you were to be shown this, then you should read an introductory book on PHP. It's just level beginning the Frother.

    The above method, in itself, is not safe, but there are ways to improve safety. For example, when a person accesses the admin page, should be a session variable allowing them access to the page if the variable is not being matched on the page. Like this:

    If ($access! = 8qe5HTx471) {die ("If you see this message, please notify the webmaster") ;}}

    Tags: Dreamweaver

    Similar Questions

    • How to create a menu burger for mobile devices with submenus?

      Hello

      I don't understand why Muse have still a self building mobile menu as it does for Desktop - Web sites. All other tools like RapidWeaver done!

      So I have to build my own burger menu manually. The problem is: How can I build with the submenus? Levels got more complex Web site and it would be much better, if the user can access directly through each of them on a mobile device in a burger menu.

      Can anyone help?

      I don't see what you want potential problems.

      Not 100% what you want, but the simple option is to nest panels in accordion inside each other. I spent 10 minutes during lunch at one place scheme (the burger is bad image and size of items is all wrong, but you can play with it (and change from pretty bad looking for something OK/good)).

      Mock up quick hamburger

      If you really want a slide from the right as in the example you have pointed out, you need to insert some html/css:

      -build the submenu just next to the page and the group. Listen to samples and inspect the element chromium to find the UID of the group. The click of the menu item, call the submenu UID and move the element on the page. Include the ease settings to soften the transition.

      Can go more in detail if you wish.

      Good luck and sorry is not the prettiest workaround. Maybe build widget a day.

    • How to create a default profile for all users of Firefox 9.

      I run a computer lab and am looking for a way to create a default profile in Firefox 9 that allows new users. I want them to be able to launch Firefox for the first time and see my home page. I want to disable any control for default browsers, firstrun pages or all the other guests.

      The former for group policy .adm files did not work longer.

      See http://www.frontmotion.com/Firefox/howtodeploy.htm

      You can create a defaults\profile file in the Firefox program folder and place the files that it be used to create and initialize a new profile.

    • How to create a default profile for all users of a computer under Windows 7/Vista for Firefox versions greater than 8? I would that all new users on a computer to get the same values by default, homepage, bookmarks, etc...

      I found some help on older versions of Firefox, but I can't seem to find anything for the latest versions greater than 8. There must be a way to do this for imaging large scale.

      Have you created a defaults\profile in the folder of the program Firefox (C:\Program Files\Mozilla Firefox\)?

      All files in this folder will be moved into each newly created profile folder.

      To give the prefs a default, it is best to do this via a mozilla.cfg file.

      Use a mozilla.cfg file in the Firefox program folder to lock the prefs or specify default values.

      Place a local file - settings.js in the defaults\pref folder where you will also find the channel - prefs.js to specify using mozilla.cfg file.

      pref("general.config.filename", "mozilla.cfg");
      pref("general.config.obscure_value", 0); // use this to disable the byte-shift
      

      See:

      You can use these functions in mozilla.cfg:

      defaultPref();  // set new default value
      pref();         // set pref, but allow changes in current session
      lockPref();     // lock pref, disallow changes
      
    • How to create a menu button of 3 lines for navigation on a mobile site?

      How to create a menu button of 3 lines for navigation on a mobile site and do trigger the Accordion Panel? I created my first sites on Muse and can't seem to understand.

      Download icons FontAwesome and install it manually.
      https://fortawesome.github.IO/font-awesome/

      Add web fonts self-hosted | Adobe Muse CC tutorials

    • How to create a Global Variable through the Project Explorer

      Hello world!

      I know how to create a global variable (in a vi through the range of functions...).

      but I'm missing a way to create one via the Project Explorer.

      It's a missing feature or just this documentation (and the intuition of myself) are missing?

      It would be very convenient.

      THX for your time and hope that answers.

      jwscs

      Right click on my computer > new > new... > select Global Variable.

      EDIT: although I agree with Gerd (he probably wondering why you need so we can recommend a better way ), I rarely use them in easy to write once - read many applications such as security levels overall program at initialization (VER) to read later, but NOT modified.  I know it would be better to make a good class, functional Global Variable (FGV) or a motor Action (AE) but globals ARE practical and safe IF used wisely.

    • How to create a global variable?

      I want to create a global variable start button to control programs in the structure of the sequence. But I do not know how to creat it. Thanks for responding.


    • How to create the file .bar for production mode?

      Hello

      How to create a file .bar for production mode?

      When Flash Builder, I configure my project for the mode of Production, he asks me a RIM certificate that must be registered (and then need a CSI file?). Where can I find this file?

      Thank you

      Signature of application information has not yet been published.  You can submit your application unsigned.  In addition, in FB4, in the Properties window of the project, under the Flex compiler, you can add

      -debug = false

      to compile without debugging information.

      Otherwise, .bar file creation is done in a regular compilation with BB CLI package.

    • How to create a menu of 4 pages on a second level page?

      How to create a menu of 4 pages on a second level page?

      Find the forum for some product your question implies and ask your question there.  Here is a link to a page that has links to all of the Adobe forums (look in the drop-down list if you do not see it introduced as a large icon)

      Forum links page:
      ----------------

      http://forums.Adobe.com/index.jspa

    • How to create a table variable

      Hi people,

      I develop a fly activity, for each branch created, I need to pass different values (that I get from DB).

      For this, my plan would be,
      -create a load of variables, array of all the values in the table (from DB)
      -pass the array to each branch in fly activity based on the index

      As I am newbie to BPEL, I don't know how to create a table variable.

      You people could guide me please.


      Concerning
      VIKI

      To add to the response of Anne:

      use XPATH to get your value

      entry/string_array / [1]
      / string_array/input [$counter]

    • How to create your default desktop for all / some users?

      Using Vista business I want to create a desktop computer by default for all users. How can I do this?

      I have a machine that has a dozen accounts. Can I retroactively apply this desktop computer to some existing accounts?

      Thanks for thehlp

      Joe

      Discussions on the topic "Change the profile by default in Vista"
      http://social.technet.Microsoft.com/forums/en-us/itprovistasetup/thread/62ed66ad-71cd-43C3-83c0-5303d77176b8/
      by Heather

      "How to make a standard profile w / user by default.
      http://forums.techarena.in/Vista-Help/1065679.htm
      by Darrell Gorter [MSFT]

      How to create the default profile for Vista
      http://help.Lockergnome.com/Vista/create-Vista-default-profile--ftopict15825.html
      Darell Gorter mentioned here only taken methods supported to change the default user profile:
      "How to customize the local default user profile when you prepare a
      image of Windows Vista, Windows Server 2008, Windows XP, or Windows Server 2003"
      http://support.Microsoft.com/default.aspx?scid=KB; EN-US; 959753
      but when you go on the link says the Tip system is not for Vista, on Windows Vista title is missing.

      I hope I could help

    • How to create the menu on the LEFT, as in new BBM?

      Is there any sample how to create the menu on the left of the application as in the new BBM?

      As I know not - there's a good menu, context menu, top menu... but how to create left?

      It's just a TabbedPane: https://developer.blackberry.com/cascades/reference/bb__cascades__tabbedpane.html

    • How to create the firewall rule for Windows 7 for javaw.exe?

      How to create the firewall rule for Windows 7 for javaw.exe? The application path differs from the new versions and user profiles. Is there generic symbols allowed for example asterisk?

      Hello

      I recommend you to send the request to another Department for assistance:

      Security in Windows 7

      http://social.technet.Microsoft.com/forums/en/w7itprosecurity/threads

      I hope this helps.

    • How to create my electronic signature for the first time

      How to create my electronic signature for the first time

      Hi debbieh62171891,

      You can fill feature & signature to create a Signature in Adobe Reader. If you want to create a Digital Signature using Adobe Reader you must then a PDF form with signature inside and drive field expanded licence fees. In this case, when you click the signature field it will take you with the process of creating a Digital Signature.

      Thank you

      Abhishek

    • How to make a menu fit for salvation policies monitors resolution is larger and readable?

      How to make a menu fit for salvation policies monitors resolution is larger and readable?

      My UI elements appear tiny. | Error postal codes of Mylenium

      Mylenium

    Maybe you are looking for