I don't think there is an HTML maxlength attibute for textarea like there is for an input type=text box, so you'll have to use an if statement in your PHP.
you just need to check the string length (using strlen) of the variable before running the query. where 500 is the max number of chars:
if (strlen ($text_area_var > 500))
{
echo "message too long";
} else {
...run the query...
}
i think my syntax is correct for checking the > greater than, but i might be a bit off
Dave