PHP Global Variable throught pages -


I am using jquery during a php project, so all the pages dynamically load into the main page , I'm trying to create links only for a certain user, so if they go to the main page and add the URL, that is? Mode = 55rt67 It gets stored as a variable and can be checked in the entire app I am using below, but it does not work. Any suggestions?

  if (empty ($ _ GET)) {$ mode = "user"; } {Define ('$ mode', '($ _GET [' mode '])}}    

defined is used to declare constants, you want to use a variable, not one constant.

Updated (session mode Use session to use): $ {$ _SESSION ['mode'] = "user";} and {$ _SESSION ['mode'] = $ _GET ['mode']: session_start on each page



Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -