Here is the code: ProductName varchar(50) NOT NULL default '',
The problem is people can still type in heaps of characters after the "50". I would like it to be so they can't type anymore after the "50". How do I do this?
Thanks for helping.
The views expressed on this page by users and staff are their own, not those of NamePros.
Like iNod said you can't actually limit the textarea with php however you can validate the input after submission. It's just a bit better than storing only 50 charactors of the input and not telling the user.
PHP:
if( strlen($_POST['textarea']) > 50)
{
echo 'You entered too many characters!';
}