help with ajax.Request
Posted: Thu Aug 09, 2007 11:15 am
Okay. I know that this has to do with Prototype, which not everyone uses, but any help would be greatly appreciated.
I am currently using an ajax.request to call a php file so that I can update an object that is stored as a Session variable. To do this call I am using this code.
var query_string = "scripts/update_widget_action.php?service_id=" + qsParm['service_id'] + "&" + value;
new Ajax.Request(query_string, { asynchronous:true, method:'post', onSuccess:loadit() });
This works great. However once I get to the update_widget_action.php and I try to do a print_r($_SESSION), it prints an empty array. To solve this I tried to put in a session_start(); which then throws an error stating that the headers have already been sent. Has anyone ran into this before?
I am currently using an ajax.request to call a php file so that I can update an object that is stored as a Session variable. To do this call I am using this code.
var query_string = "scripts/update_widget_action.php?service_id=" + qsParm['service_id'] + "&" + value;
new Ajax.Request(query_string, { asynchronous:true, method:'post', onSuccess:loadit() });
This works great. However once I get to the update_widget_action.php and I try to do a print_r($_SESSION), it prints an empty array. To solve this I tried to put in a session_start(); which then throws an error stating that the headers have already been sent. Has anyone ran into this before?