Re: Column size, user input and htmlspecialchars

From: Date: Fri, 10 Jan 2003 09:51:30 +0000
Subject: Re: Column size, user input and htmlspecialchars
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-131070@lists.php.net to get a copy of this message
Hello, "Jim" <jimyt@yahoo.com> wrote: ...[snip]... > How do you guys go about resolving this situation? Well, first, increase the size of your field, say VARCHAR(100) then in your form, use "maxlength" like this: <input type="text" name="mytext" size="50" maxlength="50" /> That would prevent them from entering more that 50 characters. (At least, that's how it should work.) But, just to make sure, count the characters entered using strlen() or something before you use htmlspecialchars()... - E __________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/

« previous php.general (#131070) next »