From The Blog

PHP: check whether an AJAX request

5 June 2013, in AjaxPHP

if ( !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) {

 

//if ajax request your code runs here

}

else{

//if not an ajax request your code runs here

}



Post a Comment