Re: checking if is FORM is POSTED
| From: | Andr� Pasold | Date: | Wed, 04 Dec 2002 16:11:36 +0000 |
| Subject: | Re: checking if is FORM is POSTED | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-17265@lists.php.net to get a copy of this message | ||
The variable $HTTP_REFERER will tell you the origin of the request.
So you can check it with:
if (EREG('xxx.php$',$HTTP_REFERER)) { //only look for the name file
//process data
}
------ or -------
if ($HTTP_REFERER=='www.yyy.com/path/xxx.php') { //look for the entire url
//process data
}
*** where xxx.php is the url of the form source
Hope it can help you any way.
"Matt Babineau" <matt@criticalcode.com> escreveu na mensagem
news:000d01c29af0$77e6d400$0210a8c0@webdevx...
> What is the best way to check if a form is posted so people can't post
> to my forms? I want to make sure that the post is coming from the right
> page and that it is indeed a post operation.
>
> Thx,
> Matt
>