Jump to content

Call php function using ajax


NotSureILikePHP

Recommended Posts

I have a dropdown menu that loads multiple locations for customers, i.e. Walmart has a location in Georgia and Louisiana. When I select the Georgia location data is filled using that location id like the phone, address, etc.

 

The problem is that my company is using an open source software for their ticketing system and they have dramatically changed the way they do things on this new upgrade that I am trying to set up. Now when that onchange event is fired, causing a postback, it throws a CSRF Token Validation error. The guys that code that system aren't usually very helpful so I thought that maybe I could use ajax to avoid the postback and still populate the data. The data is pulled from the querystring on page load for the location ID and then that ID is used to call a function in a different php page. Is there a way I can call that function from ajax or do I need to copy that code to a separate blank php page?

Link to comment
https://forums.phpfreaks.com/topic/297651-call-php-function-using-ajax/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.