I'd like to access a PHP array using JavaScript after a successful POST.
PHP Code:
return array('success' => true);
Javascript Code
$('#Get-Info').submit(function() {
$.post("info.php",
function(data){
if ( data['success'] ) {
// Do things.
}
}
);
return false; });
The javascript function is definitely running, it just can't access the PHP array.