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
Post a Comment