View Full Version : Resolved Set Character Limit on Textarea

11-02-2011, 12:53 AM

I have a textarea and I need it to only allow a maximum of 1000 characters. How can I do that?

I am currently using JavaScript to do this, but anyone that knows how to disable JavaScript can bypass it.

And I used this PHP code, to try and stop it, but it still inserts the post into the database even though it redirects as well. I know this isn't the PHP forum, but I thought I'd add this, just so nobody asks.

if (strlen($post) > 1000) {
header('Location: 1000chars.html');

11-02-2011, 01:31 AM
My stupidity!

I placed that line of code after the SQL query. I guess I dun goofed.