1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| <?php
$id_mod=$_GET["id_mod"];
echo $id_mod;
//connexion à la base de données
include ("connexion.php");
$a_modifier = mysqli_query($link, "SELECT ID, Date, Distance, Duree, VMA, FC_moy, FC_max, DP, DM, Remarques,
Int_Ext, Baskets, Type_Seance, t_10km, t_semi, Place, Participants, Place_H, Participants_H,
Categorie, Place_Cat, Participants_Cat FROM Table_Sessions WHERE ID='$id_mod'");
$val = mysqli_fetch_array($a_modifier);
?>
<form name="modifier" method="post" action="modifier.php" accept-charset="UTF-8">
<table border="1">
<caption ></caption>
<colgroup>
<col span="1" width="200" />
<col span="1" width="120" />
</colgroup>
<thead>
<tr>
<th>Champ</th>
<th>Valeur</th>
<th>Nouvelle valeur</th>
<th>Validation</th>
</tr>
</thead>
<tbody>
<tr>
<th>ID</th>
<td align=center><?php echo $val['ID']; ?></td>
</tr>
<tr>
<th>Date</th>
<td align=center><?php echo $val['Date']; ?></td>
<td align=center><input type="date" name="New_Date"></td>
<td align=center><input type="submit" name="valider_date" value="Changer la date"/></td>
<?php
if (isset ($_POST['valider_date'])){
$New_Date=$_POST['New_Date'];
mysqli_query($link, "UPDATE Table_Sessions SET Date = '$New_Date' WHERE ID='$id_mod'");
}
?>
</tr> |
Partager