Forums / Contribution-Writing Guidelines / Session not available when file is called by ajax

Session not available when file is called by ajax

Locked

Views: 3,707

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
26 Feb 2008, 8:58 PM
#1
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Session not available when file is called by ajax

I have an upload form, where my form action is something similar to this:
upload.php?zenid=121eajdasdqwdjoiasjoa
Inside the upload.php, I require application_top.php:
require('includes/application_top.php');

And somewhere in the file I use $_SESSION['customer_d']

This works fine when I need use the upload form the normal way. However, when I try to pass the form data to upload.php using Ajax, the SESSION is not available.

Any idea? I'm kinda ajax noob here.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

19 Aug 2008, 3:52 PM
#2
slck avatar

slck

New Zenner

Join Date:
Jul 2008
Posts:
9
Plugin Contributions:
0

Re: Session not available when file is called by ajax

Have you tried to insert:

session_start();

at the beginning of your .php ajax file?