There is a page.php file with live chat on Ajax, which accesses another ajaxPost.php file using code:
$("#userArea").submit(function(){ $.post('/ajaxPost', $('#userArea').serialize(), function(data){ $("#messages").append('<div>'+data+'</div>'); }); If in ajaxPost.php enter the code:
echo $_SERVER[REQUEST_URI]; Then the word "ajaxPost" (file name) is displayed. The question is how to display the REQUEST_URI file from which the request came, in this case, from page.php?
$_SERVER['HTTP_REFERER']? - Roman Paradeev