I have some javascript code that generates a开发者_如何学编程dditional input fields. So, I can know how many inputs the user will insert (or I can block the number of clones...)
so I have
$form['input'][0];
$form['input'][1];
$form['input'][2];
and so on. 
First problem
Determine how many $form['input'][]
Is this correct?
for $i=0; $i<$form.length[input][]; $i++ {
 $form['input'][$i];
}
and the query
Second problem
// number of ? must change  
($sql = $db -> prepare("INSERT INTO user (something) VALUES (?, ?)"));
$user = 1;
// problem here. this must change dynamically to the number of inputs for each user.
$sql -> bind_param('iss', $user, $form['input'][0], $form['input'][1]);
$sql->execute();
Any ideas?
Determine how many $form['input']: count($form['input']);.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论