Hi,
I'm running into a strange issue on my iPage hosted version of my website. When logging into my system, $_SESSION["id"]
contains the User ID of the logged in user. Somewhere else on my site I am doing something like this to retrieve the ID of a page:
if (isset($_GET["id"])) {
$id = $_GET["id"];
// Do something with the $id.
}
However, this actually seems to change the value of $_SESSION["id"]
. I tried doing the following to confirm this:
if (isset($_GET["id"])) {
echo $_SESSION["id"];
$id = $_GET["id"];
echo $_SESSION["id"];
}
This doesn't happen when running my website on my local LAMP environment. Can anyone tell me why this is happening and how to remedy it?
Thank,
Jonathon