Changing select options based on previous select with PHP & AJAX
The first step you’ll need to take is to reorganize your code a little. WordPress allows you to register Ajax calls via an action, wp_ajax. This is a safer and easier way to create an ajax call that you can use with javascript. Below I’ve created everything you’ll need. The first two functions will be … Read more