Re: input validation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

if (strlen($_POST['input']) < 300) { ...

You may want to also apply trim() to the input text to get rid of extraneous white space at the beginning and end of the input.

Larry

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux