Basically, after I check in jQuery.post that it's a success, I need to equate the PHP variables I created inside the success part to the response
Example:
function(response.success) {
<?php
global $wpdb;
$table = 'wp_special';
$name = RESPONSE NAME FROM PHP FILE
$email= RESPONSE EMAIL FROM PHP FILE
$wpdb->insert(
$table,
array(
'id' => '',
'name' => $name,
'email' => $email,
)
);
?>
}
If that won't work, is there a way to insert in the database in my process.php
file?. Somehow, WordPress won't let me.