Probleme transmission variable
Fermé
kamou13
Messages postés
2
Statut
Membre
-
baladur13 Messages postés 46740 Statut Non membre Dernière intervention -
baladur13 Messages postés 46740 Statut Non membre Dernière intervention -
Bonjour,
j'ai un tableau de ce genre en php:
et mon but serait d'enregistrer dans une deuxième page toutes ces lignes dans une même table.
Merci de votre aide
j'ai un tableau de ce genre en php:
Code Nom Prenom| 07-10-2009 |14-10-2009 |21-10-2009| 28-10-2009 1 titi toto | X | X | X | X 2 tre tro | | X | | X 3 uyt kiol | X | | X | 4 uu tyry | | X | |
et mon but serait d'enregistrer dans une deuxième page toutes ces lignes dans une même table.
Merci de votre aide
A voir également:
- Probleme transmission variable
- Vba range avec variable ✓ - Forum VB / VBA
- Range avec une Variable ✓ - Forum VB / VBA
- Variable d'environnement temp ✓ - Forum Microsoft Office
- Variable objet ou variable de bloc with non définie - Forum VB / VBA
- Variable objet ou bloc "with" non définie - Forum VB / VBA
2 réponses
Bonjour,
Lorsque tu parle de "table", est ce que cela signifie table SQL (j'imagine que oui mais ne sait-on jamais) ?
Comment est généré ton tableau dans ta première page ? Est-ce que l'utilisateur peut le modifier ? (j'imagine que oui sinon il n'y aurait pas besoin de l'enregistrer ^^)
Lorsque tu parle de "table", est ce que cela signifie table SQL (j'imagine que oui mais ne sait-on jamais) ?
Comment est généré ton tableau dans ta première page ? Est-ce que l'utilisateur peut le modifier ? (j'imagine que oui sinon il n'y aurait pas besoin de l'enregistrer ^^)
Bonjour
Doublon
on continue ici:
https://forums.commentcamarche.net/forum/affich-14749062-mysql-insert-multiple-dans-table#2
Doublon
on continue ici:
https://forums.commentcamarche.net/forum/affich-14749062-mysql-insert-multiple-dans-table#2
<html> <HEAD> <LINK rel="STYLESHEET" type="text/css" href="planning.css"> </HEAD> <body> <form action='enreg-mercredi.php' method=post> <table border> <tr> <th>Code</th> <th>Nom</th> <th>Prenom</th> <? $mois = date("m"); $annee = date("Y"); $jour = date("d"); $date_creation=$annee.-$mois.-$jour; $db=mysql_connect('localhost','root',''); $req="SELECT * FROM calendrier WHERE num_mois='$mois' AND nom_jour='mercredi' AND annee='$annee'"; $result = mysql_db_query("param",$req); $nomb=mysql_num_rows($result); while($row = mysql_fetch_row($result)) { $jour=$row[3]; $mois=$row[5]; $annee=$row[6]; print "<th>$jour-$mois-$annee</th>"; } $db=mysql_connect('localhost','root',''); $req1="SELECT * FROM ca"; $result1 = mysql_db_query("bories-sept",$req1); while($row1 = mysql_fetch_row($result1)) { $code=$row1[0]; $nom=$row1[1]; $prenom=$row1[2]; $mercredi=$row1[5]; if ($nomb=='4' and $mercredi=='O') { $mer_1='X'; $mer_2='X'; $mer_3='X'; $mer_4='X'; print "<tr><td>$code</td> <td>$nom</td> <td>$prenom</td> <td><input type='text' class='inp_align' size='1' name='mer_1' value='$mer_1'></td> <td><input type='text' class='inp_align' size='1' name='mer_2' value='$mer_2'></td> <td><input type='text' class='inp_align' size='1' name='mer_3' value='$mer_3'></td> <td><input type='text' class='inp_align' size='1' name='mer_4' value='$mer_4'></td> </tr>"; } else if ($nomb=='4' and $mercredi=='') { print "<tr><td>$code</td> <td>$nom</td> <td>$prenom</td> <td><input type='text' class='inp_align' size='1' name='mer_1' value=''></td> <td><input type='text' class='inp_align' size='1' name='mer_2' value=''></td> <td><input type='text' class='inp_align' size='1' name='mer_3' value=''></td> <td><input type='text' class='inp_align' size='1' name='mer_4' value=''></td> </tr>"; } elseif ($nomb=='5' and $mercredi=='O') { $mer_1='X'; $mer_2='X'; $mer_3='X'; $mer_4='X'; $mer_5='X'; print "<tr><td>$code</td> <td>$nom</td> <td>$prenom</td> <td><input type='text' class='inp_align' size='1' name='mer_1' value='$mer_1'></td> <td><input type='text' class='inp_align' size='1' name='mer_2' value='$mer_2'></td> <td><input type='text' class='inp_align' size='1' name='mer_3' value='$mer_3'></td> <td><input type='text' class='inp_align' size='1' name='mer_4' value='$mer_4'></td> <td><input type='text' class='inp_align' size='1' name='mer_5' value='$mer_5'></td> </tr>"; } else if ($nomb=='5' and $mercredi=='') { print "<tr><td>$code</td> <td>$nom</td> <td>$prenom</td> <td><input type='text' class='inp_align' size='1' name='mer_1' value=''></td> <td><input type='text' class='inp_align' size='1' name='mer_2' value=''></td> <td><input type='text' class='inp_align' size='1' name='mer_3' value=''></td> <td><input type='text' class='inp_align' size='1' name='mer_4' value=''></td> <td><input type='text' class='inp_align' size='1' name='mer_5' value=''></td> </tr>"; } } print "<br></table>"; ?> <br><br><br> <input type=submit> <input type=hidden name=code value='<? print $code; ?>'> <input type=hidden name=nom value='<? print $nom; ?>'> <input type=hidden name=prenom value='<? print $prenom; ?>'> <input type=hidden name=annee value='<? print $annee; ?>'> <input type=hidden name=mois value='<? print $mois; ?>'> <input type=hidden name=jour value='<? print $jour; ?>'> <input type=hidden name=date_creation value='<? print $date_creation; ?>'> <input type=hidden name=mer_1 value='<? print $mer_1; ?>'> <input type=hidden name=mer_2 value='<? print $mer_2; ?>'> <input type=hidden name=mer_3 value='<? print $mer_3; ?>'> <input type=hidden name=mer_4 value='<? print $mer_4; ?>'> <input type=hidden name=mer_5 value='<? print $mer_5; ?>'> </form> </body> </html>Voilà ma première page, le but est de mettre des croix dans les dates choisit pour chaque ligne.
Je cherche à enregistrer ces différentes lignes dans une seconde page.
Merci