Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Adding AJAX and working with $_SESSION


Recommended Posts

Hi, all.


I want to add some custom AJAX (from scratch) to my catalog. I have two challenges:


1)If I put my PHP processor file (ajax_functions.php) in any directory other than the catalog (such as catalog/includes/functions), the response text is the HTML for the page that says 'you don't have access' (just as if a user was to enter the url for the PHP file directly into their browser). So how do I let my AJAX functions access the processor file, without putting it in an unprotected directory?


2)Where do I need to put my processor file so that it can access the catalog's $_SESSION variables? Right now, my PHP processor includes session_start(); and I'm using the regular $_SESSION[name] to attempt to access them, but it always returns null. Is there an OSC-specific way of accessing them or something?



Link to comment
Share on other sites


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

  • Create New...