bonjour,je viens de faire un script d'inscription qui marche parfaitement (grace aux cours de mon prof),en revanche je n'ai rien pour faire un script de login+pass,et je n'en trouve pas pour odbc. voici en gros ce que j'aimerais 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
31
32
 <?php
$connect = odbc_connect("test","" ,"" );
echo '<form action=" idclient.php" method="post">';
echo'<tr ><td width="20" height="5"></td> <td width="100"><h3>login</h3></td><td> <input type="text" name="id" size="10" /> </td> </tr>';
echo'<tr ><td width="20" height="50"></td><td width="100"><h3> pass</h3></td><td> <input type="password" name="pass" size="10" /></td></tr>';
echo'<tr><td width="20" height="50"></td><td width="100"></td><td  width="2"><input type="submit" name="valider" size="10" /></td></tr></table>';
echo'<br /> <br />';
echo'</font>';
echo'<a href="../pages/inscription.php"> Cliquez ici pour vous inscrire</a> <br />';
$query = "select login,pass from client;";
$jeu= odbc_do($connect, $query);
echo '</form>';
?>
</div>
 
 
<html><head><title>Ajout d'un client</title>
</head>
<body>
<?php
$connect = odbc_connect("test","" ,"" );
if ($connect)
{
	if $_POST["id"] <> "'.$fields(0). '"  
	or $_POST["pass"] <> "'.$fields(1).'"
then
	echo 'connection impossible';
	else echo 'connection reussie';
}     echo'echec de connection';
	?>
	</body>
	</html
en gros je compare les champs id et pass avec les valeurs de ma table. Si l'un des deux ne correspond pas, j'envoi un message connection impossible,réussie,si ca marche.

je en connasi aps vraiment la synthaxe donc je viens à votre aide pour ça.