Page 1 of 1

Check the domain on which the form is - before sending

Posted: Tue May 24, 2005 7:01 am
by Calimero
The topic may be ambiguos so in details:

I have page2.php to which I'm submiting my form from the page1.php.


Now what I would like to know is:

What is the best ( most efficient way ) to check whether the page that submits the data to my page2.php is from the same server ( do I use localhost or maybe for ex. abcdefg.net ) and from the particular directory and specific page/file name?

I need this because I use this submit ( dock ) page with several forms, and input types, names, number of fields vary...

Thanks Ahead !

Posted: Tue May 24, 2005 7:03 am
by John Cartwright
when in doubt,

do a:

Code: Select all

echo '<pre>'; print_r($_SERVER); echo '</pre>';