Jump to content

[SOLVED] Weird problem...


Carnacior

Recommended Posts

At least for me.

Let me explain the story. After 2 days of thinking and debugging i still got no fix.

The problem is like this:

I got some data saved in cookie and database too. User login is done with session.

And i got session_start(); somwhere in the first lines for the user online checking and updateing.

I have noticed that if the session_start(); is there my cookie['position']; or user['position']; variable are total different. I don`t even know from where the heck he gets those data. because in the file are only 1 included file for mysql connection and that`s it before those variables.

If i remove the session_start(); the cookie works just fine. Has the real value. But the one from the database its not working because of the missing session_start();

Does someone know the problem ? sorry for my bad english. if you don`t understand something ask and i try to explain better. thanks in advice.

( and to mention i tryed to close the session before variables with session write close or session unregister or destroy but no results :-[ )

Link to comment
https://forums.phpfreaks.com/topic/172917-solved-weird-problem/
Share on other sites

they are different i just posted like that for example . originally its: $_COOKIE['mylayout']; and $user['position']; a and the session is $_SESSION['ht_mem'];.

If i test my website on localhost its working and when i upload to a server goes wrong. Im screwed :( cant fix it. Need bad help. Thanks!

Link to comment
https://forums.phpfreaks.com/topic/172917-solved-weird-problem/#findComment-911445
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.