...

View Full Version : Resolved Set Character Limit on Textarea



Microsuck
11-02-2011, 01:53 AM
Hello.

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');
}

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

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum