save radiobutton php and mysql

0

I have a form to add rows to a table what I do not know how to do is how to receive the radioButton field when saving, since each one has different names in each row, for example

  • 1st row --- SinPendulo0
  • 2nd row ---- SinPendulo1 ....
  • Vista (part of the td of my table)

    <td>                
                    <div class="form-group">
                        <label>
                          <input type="radio" name="SinPedinculo${j}[]" id="SinPedinculo${j}" value="SI">
                          Si
                        </label>                      
                        <label>
                          <input type="radio" name="SinPedinculo${j}[]" id="SinPedinculo${j}" value="NO" checked>
                          No
                        </label>
                    </div>
                </td>
                <td>                
                    <div class="form-group">
                      <div class="checkbox">
                        <label>
                          <input type="checkbox" name="GolpexJava[]" id="GolpexJava${j}" value="SI">
                          Si
                        </label>
                      </div>
    
                      <div class="checkbox">
                        <label>
                          <input type="checkbox" name="GolpexJava[]" id="GolpexJava${j}" value="NO" checked>
                          No
                        </label>
                      </div>
                    </div>
                </td>
    

    Controller (part of the controller, where I receive the fields to save them)

                    $Recepciones->Idiccab=$Idd; 
                    $Recepciones->n_item=$num_item+1;   
                    $Recepciones->Color=$_REQUEST["Color"][$i]; 
                    $Recepciones->Brix=$_REQUEST["Brix"][$i];   
                   $Recepciones->SinPedinculo=$_REQUEST["SinPedinculo"][$i];
    

    They could help me .. thank you ..

        
    asked by Vanesa Claros 20.06.2018 в 18:23
    source

    0 answers