Answers for "php is ajax request"

PHP
2

check if ajax request php

if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
	/* special ajax here */
	die($content);
}
Posted by: Guest on August-31-2020
2

ajax php

$.ajax({
                type: "POST",
                url: "event.php", 
                data:"action=chnageChart&value1="+id,
                cache: false, 
                success: function(html){  
                    window.location.reload();
                }
            });
Posted by: Guest on April-30-2021
-2

ajax call php

$.ajax({ url: '/my/site',
         data: {action: 'test'},
         type: 'post',
         success: function(output) {
                      alert(output);
                  }
});
Posted by: Guest on December-09-2020

Browse Popular Code Answers by Language