PHP session var strange value through AJAX -


My code is a bit dirty so I'll explain you in words:

I index.php page Which shows random file from my file table in my database, people get a chance to rate these files by clicking through the notes opening "vote.php" through a small AJAX pop-up.

Now this issue is index.php I draw the ID from the database and output it to:

  $ _ session ['file_id'] = $ file_id; Transcription $ _SESSION ['file_id'];  

But when I open the vote Php pop-ups and type:

  session_start (); Echo "SID ="; Transcription $ _SESSION ['file_id'];  

Value is not equal! What could be the cause of this?

Thank you very much.

Problems without this specific fixing, I do not think that $ _ session Here is the requirement.

Can not open vot.php with

 < vot.php? File_id = xxxx  

When you want to generate index.php, you want to add a variable to the URL.

There is no need for a session here.


Comments