How to create admin ajax function for my contact form
The easiest way for me was to create a plugin. The plugin has code to handle the AJAX request. DO NOT add code to admin-ajax.php! The WordPress Codex has a great tutorial on how to do this. That’s definitely the place to start.