Just want to get the echo value from PHP.AJAX code:
Code:
$.ajax({
type: 'POST',
url: 'member_data.php',
datatype: 'text',
async: false,
success: function(response){var k = response;}
});
PHP code:
PHP Code:
<?php
$ID = '60543';
echo $ID;
?>
I tried an alert on the k variable but nothing other than undefined. Tried many variations but so far no luck. I must be missing some little thing... ...
http://codango.com/cant-get-response-from-php-using-ajax/
I am happy to share this resource that we found. The content displayed on this page is property of its original author or their organization.
No comments:
Post a Comment