Hi, I am using $_SERVER['HTTP_X_REQUESTED_WITH'] to detect if the request is coming from an AJAX page, but the above server variable is not available. Where is the problem...? Thanks in advance.
You won't know where it's coming from. All you can detect it the referring page, using $_SERVER['HTTP_REFERRER'];
may be same tutorial you are using also say $_SERVER['HTTP_X_REQUESTED_WITH'] is the golden ticket but not all servers provide this variable so having other checks in place will be important.