Hi

I can access the right session from a drupal node but I'm trying to access a users session from a .php file which I am using in an ajax form.

I have tried setting session_name before session start passing it in in the url.

Hope that is clear, I just need a way of using the current session in a file outside drupal.

Comments

jabberwok’s picture

I still need help with this if anyone knows what the problem is?

jabberwok’s picture

Well It seems while I was waiting I solved my own problem

it seems adding this code to the .php (providing it is in drupal root directory) boots up like a core drupal, you can then access the correct session wth session_start()

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

here are the links to the articles that helped me
http://drupal.org/node/45598
http://drupal.org/node/180157

hope this helps someone