mrjameer Posted October 2, 2006 Share Posted October 2, 2006 hi,i want to create a textarea in which the user can input 100 characters only.he canot able to input more than 100.i want to do this with out using php/javascript.is it possible.your help will be appreciatedthanksmrjameer Quote Link to comment https://forums.phpfreaks.com/topic/22811-limiting-characters-in-textarea-without-phpjavascript/ Share on other sites More sharing options...
AndyB Posted October 2, 2006 Share Posted October 2, 2006 Not possible with textarea, but maxlength can be set for input type="text" Quote Link to comment https://forums.phpfreaks.com/topic/22811-limiting-characters-in-textarea-without-phpjavascript/#findComment-102760 Share on other sites More sharing options...
mitzleah Posted October 3, 2006 Share Posted October 3, 2006 You then use javascript. Here's a good source: http://javascript.internet.com/forms/limit-textarea.html Quote Link to comment https://forums.phpfreaks.com/topic/22811-limiting-characters-in-textarea-without-phpjavascript/#findComment-102879 Share on other sites More sharing options...
JasonLewis Posted October 3, 2006 Share Posted October 3, 2006 why dont you want to use javascript? that would be the best way to go. You could just to a strlen() for your textareas $_POST var and if it is greater then the amount you want then redirect them back. Quote Link to comment https://forums.phpfreaks.com/topic/22811-limiting-characters-in-textarea-without-phpjavascript/#findComment-102986 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.