Send data from a WP page using AJAX
-
Hello, I developed a JavaScript single page application and I embedded it in a WP page.
When the user has finished using this application he sends data to the server using simple JS.
At the moment it works but, after reading some post here and there, I found maybe I conceived this thing the wrong way.
That is: currently, I send data using a PHP file that’s NOT part of WordPress (either theme, plugin or core). This thing is probably not a good idea.
I red something about wp_nonce and its validation but I could not understand how the entire sending process would work.
I know how to get wp_nonce but I don’t know how and which file should validate wp_nonce (phpfunctions.php?) and how to connect my request to that file/function.
Can you help me?
- The topic ‘Send data from a WP page using AJAX’ is closed to new replies.