Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var datastring = {
- newEmailForm: newEmailForm,
- properties: properties
- };
- //got the data, make the ajax request
- jQuery(function(){
- jQuery.ajax({
- type:'POST',
- data:{
- action: 'elegantSendEmail',
- datastring: datastring
- },
- url: ajaxurl
- })
- })
- action elegantSendEmail
- datastring[newEmailForm][0][] {…}
- 0 email
- 1 title
- 2 Message
- datastring[properties][0][] {…}
- 0 31466
- 1 value1
- 2 value1
- datastring[properties][1][] {…}
- 0 31440
- 1 value2
- 2 value2
- $obj = json_decode($_POST['newEmailForm'][0], true);
- echo '<pre>';
- print_r($obj);
- echo '</pre>';
- $obj = json_decode($_POST['datastring']['newEmailForm'][0], true);
Add Comment
Please, Sign In to add comment