Reply to Re: [PHP] input validation?

Your name:

Reply:


Posted by tg-php on 01/12/06 19:41

Hmm.. I didn't see anyone ask "before or after the user clicks SUBMIT"?

If it's before, then you should use javascript to check the form element prior to submitting (you can check realtime with the onkeydown, onkeyup events... check after a user moves off of the form element with onchange or even onfocus/onblur... or when the user clicks 'submit' with the onsubmit event).

Whenever you check it... it's going to be something like forms[formnameornumber].formelementname.length or something like that in JS.


If it's after the user submits the form, then yeah, what everyone else said.. strlen($data) (where $data contains the information submitted).

-TG

= = = Original message = = =

Hello,

I need to check that user input text is less than 300 characters long. How?

Thanks
-Will


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация