Re: [PHP] [PHP or maybe JavaScript or CSS] protecting my PHP from bad input

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-19-2003
Miroslav I.
 
Posts: n/a
Default Re: [PHP] [PHP or maybe JavaScript or CSS] protecting my PHP from bad input

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.

..
..
..
Reply With Quote
  #2 (permalink)  
Old 11-19-2003
Eugene Lee
 
Posts: n/a
Default Re: [PHP] [PHP or maybe JavaScript or CSS] protecting my PHP from bad input

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0