php - Alternative to passing variable info through URLs -
I am writing a php / mysql app which uses a few different tables.
Table 1 stores user information (name email etc.), table 2 store, user widget, and table 3 store those different widgets configuration.
The way I am doing this now, the key to an automatic increase in Table 1 is that I use the specific user skills when they use Table 2, then it creates a line In which the table is the key ID, as well as the "UID", which is the key ID, from that specific user of Table 1. When the user wants to set the settings for their widgets, in Table 3, this is what I call "cxid", or config xid, which is unique widget id from Table 2.
This goal is to limit which users are visited, and clearly used for config configuration purposes.
The problem is, when a person passes the URL in the UID, when calling widgets. This is clearly a security problem because you can change it and see other people's widgets. But I do not want anyone to know how this is being done. Is there a way to pass the variables between the scripts that do not use the URL, but the form is not being used either?
You can use
Basically, you store all the necessary information about the user on For example, on first page load: By default, the user will receive a cookie identifying the session, but there is no other information in it. On the second page load, you can call: will read the user's cookie, search the session information (by default stored in a temporary file location) and fill the last time stored with the $ _ session / <>, and retrieve it on every page load.
session_start (); $ _SESSION ['UID'] = 123;
session_start (); $ X = $ _SESSION ['UID']; // $ x Now 123 // Run a Query Here!
$ _ session
Saw them
Comments
Post a Comment