Récupération 3ème et 4ème colonne

Récupération 3ème et 4ème colonne - PHP - Programmation

Marsh Posté le 29-06-2016 à 15:05:21    

Bonjour à tous,  
 
j'ai un problème de récupération de données d'un tableau, voici le code du tableaux .
 

Spoiler :


        <table id="AppliAL" name="appliAL">
                        <?php  
                        $select = 'SELECT * FROM T_APPLIALL where `ID_SAS` IN (1,4)  ';
                        $result = mysqli_query($conn,$select) or die ('Erreur03 : '.mysql_error() );
                        $total = mysqli_num_rows($result);
                                echo '<tr class="td">';
                                    echo '<td><input type="checkbox" id="FullCtrlApplis" ></input></td>';
                                    echo '<td class="td"><strong>Nom</strong></td>';
                                    echo '<td class="td"><strong>Type</strong></td>';
                                    echo '<td class="td"><strong>Connexion</strong></td>';
                                    echo '<td class="td"><strong>Compte</strong></td>';
                                    echo '<td class="td"><strong>Mot de passe</strong></td>';                            
                        while($row = mysqli_fetch_array($result))  
                            {  
                                echo '<tr>';
                                    echo '<td id="CheckAppli" class="td"><input type="Checkbox"  name="AppliAL[]" value='.$row["ID"].'></input></td>';  
                                    echo '<td>'.$row["NOM"].'</td>';
                                    echo '<td>'.$row["TYPE"].'</td>';
                                    echo '<td name="AuthAppliAL[]">'.$row["AUTH"].'</td>';
 
                                    if ($row['AUTH'] == "Oui" ) {
                                            echo '<td name="TypeAppliAL[]"><input type="text"/></td>';
                                            echo '<td><input type="password"/></td>';
                                    }
                                     
                                echo '</tr>'."\n";
                            }
                            mysqli_free_result($result);
                        ?>
                        </table>


 
 
Et j'aimerai récupérer les colonne de TYPE et AUTH  
cela me permet de regénérer une page avec les données récupérer  
 
Voici la page du Scripts

Spoiler :


  $Nom=($_POST['nameusersAL']);
  $Machine=($_POST['namemachineAL']);
  $Num=($_POST['numusersAL']);
  $Mail=($_POST['mailusersAL']);
  $Site=($_POST['siteAL']);
  $Matricule=($_POST['matriusersAL']);
  $MdpWin=($_POST['mdpwinusersAL']);
  $MdpNotes=($_POST['mdpnoteusersAL']);
  $MdpCloud=($_POST['mdpcloudusersAL']);
  $Comm=($_POST['commusersAL']);
  $type_applicati=($_POST['TypeAppliAL']);
  echo $type_applicati;
   
  foreach ($_POST['AppliAL'] as $application) {
   # code...
  }
  foreach ($_POST['TypeAppliAL'] as $type_application) {
   # code...
  }
  foreach ($_POST['AuthAppliAL'] as $auth_application) {
   # code...
  }
 
  $Select_IDMachine="SELECT * FROM `T_MACHINE` WHERE `NOM`='".$Machine."' ";
  $Requete_SelectID= mysqli_query($conn, $Select_IDMachine);
 
  $Result_SelectID = mysqli_fetch_array($Requete_SelectID);
 
   $Requete_Insert=mysqli_query($conn,"INSERT INTO T_USER (ID_SAS,ID_MACHINE,SITE,MDP_NOTES,MDP_CLOUD,MDP_WIN,PRINTER) VALUES ('1','".$Result_SelectID["ID"]."','".$Site."','".$MdpNotes."','".$MdpCloud."','".$MdpWin."','VAI')" ) or die ('Impossible d insérer les utilisateurs Alsaçe'.mysqli_error($conn));
   
   $ID_USERS = mysqli_insert_id($conn);
 
   $Insert_IdUsers="INSERT INTO T_APPLIUSER (ID_USER,ID_APPLI,TYPE,MDP_APPLI) Values ('".$ID_USERS."','".$application."','".$type_application."','".$auth_application."' )";
    $Requete_InsertUsers=mysqli_query($conn, $Insert_IdUsers) or die ('Erreur 01 Alsaçe'.mysqli_error($conn));
 
 
   $Update="UPDATE T_MACHINE SET `MATRICULE`='".$Matricule."', `EMAIL`='".$Mail."', `ETAT_FOR`='OK'";
   $Requete_Update= mysqli_query($conn, $Update);
 


 
Comme vous pouvez le voir j'ai essayer plusieurs méthode avec des foreach etc ...  
 
Une bonne âme peut-elle m'aider ?
 
Merci d'avance

Reply

Marsh Posté le 29-06-2016 à 15:05:21   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed