I have a .php
file that loads and displays all news from my database, I use this file to load the news dynamically with AJAX. So far so good, the user can usually go to the index.html
page and see the news that has been uploaded via AJAX and PHP, but the user can also go to the noticias.php
page and see all the news on the page. But I did not want this, did not PHP have to return data to AJAX or something like that? So that the user can not directly access the noticias.php
?