In local host i could create $username and $_SESSION['username'] and were two different variables, now it seems to interfere?

1) both are different

2) one is $username is local page variable and $_SESSION['username'] is a session variable and its an array too.

3) even $UserName, $userName, $_SESSION['uSERnAME'], $_SESSION['UserName'] all are different as php is case sensitive

4) any $_SESSION variable is available globally across all pages if you start your page with session_start(); function

5) other variables stay live for that particular page only

1) both are different

2) one is $username is local page variable and $_SESSION['username'] is a session variable and its an array too.

3) even $UserName, $userName, $_SESSION['uSERnAME'], $_SESSION['UserName'] all are different as php is case sensitive

4) any $_SESSION variable is available globally across all pages if you start your page with session_start(); function

5) other variables stay live for that particular page only

Yes, im aware of all this, but for some reason $username is changing $_SESSION['username'] variable... $id is changing $_SESSION['id'] value.. etc, as i said before , in localhost it was working perfectly fine... when i pass it all to ipage the problem starts..

thanks for reply

here are some screenshot so u know im not crazy....

1) both are different

2) one is $username is local page variable and $_SESSION['username'] is a session variable and its an array too.

3) even $UserName, $userName, $_SESSION['uSERnAME'], $_SESSION['UserName'] all are different as php is case sensitive

4) any $_SESSION variable is available globally across all pages if you start your page with session_start(); function

5) other variables stay live for that particular page only

Is register globals turned on perhaps?

yes it is turned On, should i turn this off? (screenshot below)

I turned to off, and now it works fine, pfff that was a weird one , thank you very much pritaes

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.