Re: Stopping bad entries in PHP form
| From: | Ashley Sheridan | Date: | Thu, 19 Mar 2009 21:03:47 +0000 |
| Subject: | Re: Stopping bad entries in PHP form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290310@lists.php.net to get a copy of this message | ||
On Thu, 2009-03-19 at 13:46 -0700, sono-io@fannullone.us wrote:
> I have a PHP form that allows end users to request a sample of the
> products we sell. Unfortunately, a person/people have found it and
> are sending in bad requests. We sell only within the US, and so I've
> set up the form so that they must choose one of the 50 States. But we
> keep getting requests with countries in the city field, i.e. "Moscow
> Russia".
>
> Is there a way that I can scan for country names, etc. in the text
> fields and stop a request from going through if it finds one of those
> "banned" words? I've searched for a solution but haven't been able to
> find it.
>
> If this is not enough info, please let me know. Also, I only know
> enough PHP just to be dangerous, so please be kind. =;)
>
> Thanks,
> Frank
>
Why make them enter the details? Let them choose from a select list
instead, forcing them to select a state.
Ash
www.ashleysheridan.co.uk