Re: [PHP or maybe JavaScript or CSS] protecting my PHP from bad input
| From: | Miroslav I. | Date: | Wed, 19 Nov 2003 09:21:16 +0000 |
| Subject: | Re: [PHP or maybe JavaScript or CSS] protecting my PHP from bad input | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-170251@lists.php.net to get a copy of this message | ||
Thanks Eugen,
I'm familiar with the concepts, but I've seen sites with textboxes that
would not show any letter typed - only numbers are displayed in the textbox.
This is what I like but don't know how to achieve. :-)
> : #The problem:
> : This is about protecting my PHP from bad input (e.g.: letters instead
> : of numbers).
>
> Good idea. You need to make sure user-inputted data is valid.
>
> : ##
> : Is there a way to prevent user from even inputting a letter in a text
> : box?
>
> There's two general ways to do data validation: client-side and
> server-side. PHP is server-side. JavaScript is client-side.
.
.
.