This article mainly introduces how to use php to batch add a multi-line text box textarea with one row. For more information, see textarea.
The code is as follows:
$ Act =! Empty ($ _ GET ['AC'])? Trim ($ _ GET ['AC']): '';
Switch ($ act ){
Case 'adda ':
$ Area ['A _ value'] = trim ($ _ POST ['A _ value']);
$ Area ['A _ type'] = 3;
If (strpos ($ area ['A _ value'], "\ n") === false ){
// Echo $ area ['A _ value'];
// Add ($ area );
// $ DB-> insert ('bcrh _ article_attr ', $ area );
}
Else
{
$ Areanames = explode ("\ n", $ area ['A _ value']);
Foreach ($ areanames as $ areaname ){
$ Areaname = trim ($ areaname );
If (! $ Areaname) continue;
// Echo $ areaname. '| ';
$ Area ['A _ value'] = $ areaname;
// $ DB-> insert ('bcrh _ article_attr ', $ area );
}
}
Header ("refresh: 0; url = gfxrtz. php"); // jump to the page, note the path
Exit;
Break;
}
The code is as follows: