Je n'arrive pas a réaliser un formulaire de recherche pourtant basique :
Voici ma page de form :
Et ma page de php / affichage :
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 <form action="recherche_php.php" method="POST"> <div id="tableau1"> <table id="table1" width="400" border="0" cellspacing="1" cellpadding="2"> <tr> <td width="100">Numéro de dossier</td> <td><input name="dos_num" type="text" id="dos_num"></td> </tr> <td width="é00">Numéro contrôle</td> <td><input name="ctrl_num" type="text" id="ctrl_num"></td> </tr> <td><input name="add" type="submit" id="recherche" value="Rechercher"></td> </table> </div> </form>
Je ne vois pas vraiment où est mon erreur...
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 <?php include('connexion.php'); $dos = $_POST['dos_num']; $ctrl = $_POST['ctrl_num']; $sql = "SELECT * FROM dossier WHERE dos_num='$dos' or ctrl_num='$ctrl'"; $resultat = mysql_query($sql); echo' <table id="table4" width="400" border="0" cellspacing="1" cellpadding="2"> <tr> <td width="200">Détail expérience</td> <td><input name="det_num" type="text" id="det_num" value="' . $resultat['det_num'] . '"></td> </tr> <tr> <td width="200">Justificatif activité</td> <td><input name="jus_num" type="text" id="jus_num" value="' . $resultat['jus_num'] . '"></td> </tr> </table>'; ?>
Partager