Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $variable = 'Some value';
- function process_ajax() {
- GLOBAL $variable;
- //now u can use $variable
- //do something
- }
- if($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
- process_ajax();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement