zohab Posted January 5, 2010 Share Posted January 5, 2010 Hi, I have text area and maximum numbers of characters allowed are 600 if user type more than 600 characters then it will not be allowed <textarea name="textarea" cols="67"rows="6" ></textarea> Link to comment https://forums.phpfreaks.com/topic/187252-fixed-numbers-of-characters-in-textarea/ Share on other sites More sharing options...
vinpkl Posted January 5, 2010 Share Posted January 5, 2010 it will be done through javascript. see the link below for answer http://webdesign.about.com/library/weekly/bl_aa042202-form2.htm vineet Link to comment https://forums.phpfreaks.com/topic/187252-fixed-numbers-of-characters-in-textarea/#findComment-988922 Share on other sites More sharing options...
haku Posted January 5, 2010 Share Posted January 5, 2010 A javascript solution is nice for the user, but it's very easy to circumvent, so there should always be a server-side check of the length as well, using PHP or whatever other server side language the site is built around. Link to comment https://forums.phpfreaks.com/topic/187252-fixed-numbers-of-characters-in-textarea/#findComment-988924 Share on other sites More sharing options...
TheFilmGod Posted January 6, 2010 Share Posted January 6, 2010 What happened to the maxlength tag? Google it. This is the best client side validation you can get. You should always validate user entry through php. ALWAYS. Link to comment https://forums.phpfreaks.com/topic/187252-fixed-numbers-of-characters-in-textarea/#findComment-989322 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.