Is there a way to make sure PHP is being loaded only by JS?
<p>Is there a way to make a PHP file so that it can only be loaded and executed by the Javascript code that I write? I.e can I make sure that someone can't read my JS, load up the PHP page in their browser with their own variables, and make unauthorized changes to my database? 
Any help much appreciated.</p>
