MikeL Posted March 1, 2008 Share Posted March 1, 2008 Still new to the whole PHP/MYSQL thing and wanted to ask what you think it the best way to validate the maximum length of a textarea from a form? And how long do you let it go for? Its text type in MYSQL, and its going to be the body of a blog post. Link to comment https://forums.phpfreaks.com/topic/93797-validating-textarea-input-to-mysql-best-practice-question/ Share on other sites More sharing options...
trq Posted March 1, 2008 Share Posted March 1, 2008 You can use strlen to see how long a string is, its up to you however how long you wish to limit it to. Link to comment https://forums.phpfreaks.com/topic/93797-validating-textarea-input-to-mysql-best-practice-question/#findComment-480634 Share on other sites More sharing options...
MikeL Posted March 1, 2008 Author Share Posted March 1, 2008 thanks... ya, that's what I'm using right now. I just set it to 50,000 characters. Just in case anyone wants to write a book for a blog post. haha. I figured I'd ask to see if someone had something that's kind of standard. Guess its probably just strlen. Link to comment https://forums.phpfreaks.com/topic/93797-validating-textarea-input-to-mysql-best-practice-question/#findComment-480641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.