Bonjour voila mon code que j'ai écrit pour récupérer le numéro d'utilisateur de la personne qui s'identifie
Voila c'est la page ou l'utilisateur rentre son log et son pass
Malheureusement dans la page suivante je récupère bien un numéro mais ce n'est pas celui de la personne identifié mais c'est le numéro de la dernière personne dans la base
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
31
32
33
34
35 <form action="connexion.php" method="post"> <table> <tr> <?php $sql = "SELECT * FROM users"; $sql_exe = mysql_query($sql) or die('Erreur : ' . mysql_error()); while ($Tab = mysql_fetch_array($sql_exe)) { ?> <td width="300" height="28" align="center"><input name="numuser" type="hidden" value="<?php echo $Tab['num_user']; ?>"/></td> <?php } ?> </tr> </table> <table width="300" border="0"> <tr> <td width="300" align="center"><span class="intitule">Login</span></td> </tr> <tr> <td width="300" height="28" align="center"><input name="login" type="text" /></td> </tr> <tr> <td width="300" height="28" align="center"></td> </tr> <tr> <td width="300" align="center"><span class="intitule">Password</span></td> </tr> <tr> <td width="300" align="center"><input name="pass" type="password" /></td> </tr> </table> <br /> <table width="300" border="0"> <tr> <td width="300" align="center"><input name="entrer" type="submit" value="Connexion" /></td> </form>
Partager