I have a file that sets a session and then an AJAX javascript file calls another file that should read the first files session. It looks like this. mainfile.php //creates session --> AJAX javascript in main file // calls file2.php --> file2.php gets mainfile.php's session. It should work but it doesn't, what do you guys think I'm doing wrong? Basicly I want to create a variable containing mainfile's file name and get the variable in the second PHP file for processing. Please tell me how to do this. Thanks. ~imozeb
If you don't have it already, try placing this on the begining of file2.php: session_start(); Code (markup):
I did already place session_start(); at the beginning of my second and first php pages. Can anyone tell me a work around for this problem. I want a way to pass a variable from one PHP script to another without using sessions cause it's broken and it has to be secure so I can't use cookies. Is there any other way?
I screwed around with the sessions somemore and I found a few glitches. The sessions are working again but I figured out that I didn't need them. Crap.