This is a discussion on Re: [PHP] [PHP or maybe JavaScript or CSS] protecting my PHP from bad input within the PHP General forums, part of the PHP Programming Forums category; Thanks Eugen, I'm familiar with the concepts, but I've seen sites with textboxes that would not show any ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. .. .. .. |
|
|||
|
On Wed, Nov 19, 2003 at 10:21:16AM +0100, Miroslav I. wrote:
: : 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. :-) Base on what I mentioned earlier, it sounds like you're looking for JavaScript-based data validation. Your best bet is to look at examples of JavaScript code. Here's a link to HotScript.com: http://www.hotscripts.com/JavaScript...rms/index.html |