Php batch add one row in the multi-line text box textarea. Copy the code as follows: $ act! Empty ($ _ GET [act])? Trim ($ _ GET [act]):; switch ($ act) {caseadda: $ area [a_value] trim ($ _ POST [a_value]); $ area [a_type] 3; if (strpos
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:
Http://www.bkjia.com/PHPjc/779573.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/779573.htmlTechArticle code: $ act =! Empty ($ _ GET ['AC'])? Trim ($ _ GET ['AC']): ''; switch ($ act) {case 'adda ': $ area ['A _ value'] = trim ($ _ POST ['A _ value']); $ area ['A _ type'] = 3; if (strpos...