I would like to know how I can make use of textarea along with php and mysqli to do the following I need to send 12 items inside a textarea and that these items are put with line break and that apply insert of those 12 items in mysqli being that if you do not post all 12 of error I only need that in max only allow 12 items per textarea, if post less than equal to 12 works perfectly.
Because I have 12 fields in the media table to put the links.
In case I need to send the text textarea and SQL below so that each position in the case is a column in the media table that goes from column link1 to link12.
<textarea rows="12" name="links">
link1
link2
link3
link4
link5
link6
link7
link8
link9
link10
link11
link12
</textarea>
Mysql
CREATE DATABASE 'media' ;
CREATE TABLE 'media'.'medias' (
'id' INT( 5 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
'link1' VARCHAR( 255 ) NOT NULL ,
'link2' VARCHAR( 255 ) NOT NULL ,
'link3' VARCHAR( 255 ) NOT NULL ,
'link4' VARCHAR( 255 ) NOT NULL ,
'link5' VARCHAR( 255 ) NOT NULL ,
'link6' VARCHAR( 255 ) NOT NULL ,
'link7' VARCHAR( 255 ) NOT NULL ,
'link8' VARCHAR( 255 ) NOT NULL ,
'link9' VARCHAR( 255 ) NOT NULL ,
'link10' VARCHAR( 255 ) NOT NULL ,
'link11' VARCHAR( 255 ) NOT NULL ,
'link12' VARCHAR( 255 ) NOT NULL ,
) ENGINE = MYISAM ;