In my website I have a simple form running with ajax. And in ajax property url: '/myfile/script.php'
and that is the whole script file run that form. So if someone access that file using this url: localhost/myfile/script.php
it can be accessed. But I wants to avoid being happening this.
$.ajax({
url:"/myfile/script.php",
method:"POST",
data:{query:query},
success:function(data)
this is the ajax script. Please someone guide me through this if there are any methods available.