All right... I've been looking for answers on PHP.net for the past few days and I haven't come up with any - so I hope someone here will be able to help. First of all, I'm trying to keep a PHP page from being loaded directly or refereshed, as below:
if($PHP_SELF = $_SERVER["HTTP_REFERER"] ){
die("<b>Please do not load this page directly</b>");
}
However, my variables don't seem to be correct (or something else), because one of two things happens, depending on if I use an "=" or an "==". Either the script denies even when it's parsing form input from an HTML source, or it doesn't die at all. What am I doing wrong?
I also have another quick question -
I am looking for a function to include a file, but parse it as PHP. Specificly, I'm defining variables in another file, that I need included into the script. require() and include() both just display the file - is there a function that will parse it as PHP?
Any help would be greatly appriciated!