Name is a variable. how to write VALUE into the database while & nbsp ;(!! $ _ Rows & nbsp; _ fetch_array_list ($ _ result2 )){? & Gt; & lt; tr & gt; & lt; td & gt; & lt ;? Php & nbsp; echo & nbsp; $ _ rows [bh];? & Gt; & lt; input & nbsp; namebh [] & name is a variable. how to write VALUE into the database
While (!! $ _ Rows = _ fetch_array_list ($ _ result2 )){
?>
Normal
Abnormal
This sentence
Normal
Abnormal
I don't know how to get it. name is a variable. how can I transfer it to the database?
The following statements are processed:
$ Hh = $ _ POST ['hao1 '];
$ Aa = $ _ POST ['Bh '];
$ Bb = $ _ POST ['xm '];
$ Cc = $ _ POST ['hangfa '];
$ Dd = $ _ POST ['biaozhun'];
$ _ Gh = $ _ COOKIE ["name"];
$ _ Time = $ _ POST ['Time'];
$ Zt = $ _ POST [''];
$ Name = implode (_ fetch_array_list (mysql_query ("SELECT name FROM jsy WHERE gonghao = $ _ gh ")));
If (is_array ($ aa )){
Foreach ($ aa as $ I =>$ v ){
Mysql_query ("insert into djjl (hao, bh, xm, fangfa, biaozhun, gonghao, name, time, zt) VALUES (
'$ Hh ',
'$ V ',
'{$ Bb [$ I]}',
'{$ Cc [$ I]}',
'{$ Dd [$ I]}',
'$ _ Gh ',
'$ Name ',
'$ _ Time ',
'{$ Zt [$ I]}'
) ") Or die ('SQL execution failed! '. Mysql_error ());}}
Mysql_close ();
_ Alert_location ('added successfully! ', 'Ksdj. php ');
?>
------ Solution --------------------
Run the following command to name the file:
$ I = 0;
While (!! $ _ Rows = _ fetch_array_list ($ _ result2 )){
............
Normal
Abnormal
$ I ++;
}
After submission:
$ Zt = $ _ POST ['zt ']; can be used for traversal.