par
agité » 20 janv. 2006, 17:49
Bonjour
j'essaye d'ouvrir une session comme suit :
Code : Tout sélectionner
<html>
<head>
<title>Login</title>
</head>
<body>
<br><br><br><br>
<form name="form" action="log.php" method="POST">
<table align="center" border="1">
<tr>
<td align="center">Connection</td>
</tr>
<tr>
<td>
<b>Login :</b><br>
<input type="text" name="login"><br>
<b>Pass :</b><br>
<input type="password" name="pass"><br>
<center><input type="submit" value="Connection">
</td>
</tr>
</table>
</form>
</body>
</html>
après je traite login et pass par log.php :
<?
if($login=="demo" AND $pass=="demo")
{
echo"login ok";
}else{
echo"recommencez";
}
?>
Mais il m'indique l'erreur suivante :
Notice: Undefined variable: login in
c:\log.php on line
3
Mais il m'indique bien "recommencez" ce qui prouve qu'il test.
Je vois pas pourquoi j'ai ce message ^^