How to test
| From: | Bas Jobsen | Date: | Thu, 08 Aug 2002 09:31:36 +0000 |
| Subject: | How to test | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111621@lists.php.net to get a copy of this message | ||
Hello,
How can i test if a post request realy came from the right form?
Now i have:
if(!strstr($HTTP_SERVER_VARS['HTTP_REFERER'],$HTTP_SERVER_VARS['SERVER_NAME'])
|| $HTTP_SERVER_VARS['REQUEST_METHOD']!='POST')exit;
But this goes wrong soon as HTTP_REFERER isn't set.
Thanks,
Bas