Bonjour à tous,
alors mon problème étant que j'ai fait une page avec un formulaire en html :
Une fois ce formulaire remplie, les valeurs se mettent dans le tableau :
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <title>Modification du classement du CDC</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body><center> <h2>Voici le tableaux :</h2> <h3>En construction ...</h3> <body> <p> <form method="post" action="tab.php"> <label>Nom du pilote !<br /> <input type="text" name="nom"/> </label><br /> <br /> <label>Position du pilote !<br /> <input type="text" name="position"/> </label><br /> <br /> <label>Pénalités du pilote !<br /> <input type="text" name="penalite"/> </label><br /> <br /> <label>Total points du pilote !<br /> <input type="text" name="totalpoints"/> </label><br /> <br /> <label>Temps du pilote !<br /> <input type="text" name="temps"/> </label><br /> <p> <input type="submit" /> <input type="reset" /> </p> </form> <p> Cette page est réservée aux membres de l'équipe QdP. </p> </center></body> </html>
Jusque là tout va bien, mais si je quitte la page ou j'avais le tableau et que j'y retourne après, ça n'a pas sauvegarder mes actions (le tableau est vide), comment faire ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <table width="468" border="2"> <tr> <th width="61" scope="col">Position</th> <th width="88" scope="col">Pilote</th> <th width="63" scope="col">Pénalité</th> <th width="94" scope="col">Total points </th> <th width="126" scope="col">Temps</th> </tr> <tr> <th scope="row"><?php echo $_POST["position"]; ?></th> <td><center><?php echo $_POST["nom"]; ?></center></td> <td><center><?php echo $_POST["penalite"]; ?></center></td> <td><center><?php echo $_POST["totalpoints"]; ?></center></td> <td><center><?php echo $_POST["temps"]; ?></center></td> </tr> <tr> <th scope="row"> </th> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <th scope="row"> </th> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table>
Et comment faire pour que le tableau classe tout seul par "position" dans l'ordre chronologique (1, 2, 3 ...) ?
Merci d'avance !
Partager