Frage

I know that it can be done with varchar, char and others. but, is it possible with text?

War es hilfreich?

Lösung

TEXT itself can't be limited, but you can limit - through the code that's handling then passing it to the PHP - how much the user can enter. For example, in javascript, if "str.length>X" you could alert "Stop being so long-winded," rather than posting to the PHP handling page - that is, of course, very easily defeated. However, couple that with a check in the php before putting it into the database, and you should be good.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top