I am having a problem with my code as my php variable is not being echoed on page when using ajax jquery. Here is my code...
A bit more simplified would be:
$.post(URL, { data: somefield }, function(result) { result = JSON.parse(result); If(result && result.status === 'true'){ } )};
Depends a bit on the return at server side.