one row insert into mysql from a loop php -


i have loop need elements , need insert each element in mysql table code able insert 1 element.(p.s. variable loaded min 4 element).

why i'm not able insert multiple element loop?

please need know urgently.thanks

function addmijloc(){  foreach ($_session["mijloc"] $check) { $sql="insert isu_mijloace (`nr_rap_ext_mijl`, `mijloc`) values ('".$_session['nrraport']."', '".$check."')"; if(mysql_query($sql))      {     $mijloace="ok";      }     else     {     echo '<script>alert("tabela mijloace eronata");</script>';       } } } 

did try result when print_r($check) in loop?


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -