dkjoe dkjoe - 5 months ago 17x
SQL Question

Mysql field type for </textarea>?

I have a mysql field type "tinytext" and am using performing and update via my form with following extract:

<!-- Text input
<div class="control-group">
<label class="control-label" for="myinput"> Input code</label>
<div class="controls">
<textarea class="form-control" id="myinput" name="myinput" rows="4" ><?php echo $myinput;?> </textarea>

However the field is not recieving the data properly.
What mysql field type do I use for a textarea of about 4 lines?

TINYTEXT - 256 bytes
TEXT - 65,535 bytes
MEDIUMTEXT - 16,777,215 bytes
LONGTEXT - 4,294,967,295 bytes

As OP clearly mentioned "..field is not recieving the data properly." And, need to insert 4 lines in <textarea>. So, from my side text field type should be used for myinput textarea.

For more info, Please click Data Type Storage Requirements