Voilà le code de mon programme:
<?php
function form()
{
include("header.php3" );
echo "
<form method=post action=index.php3><br>
<input type=hidden name=op value=verif>
<FONT face=\"Verdana, Arial, Helvetica, sans-serif\" size=1>
Login : <input type=text name=nick0 size=12><br>
Password : <input type=password name=pass0 size=12><br>
</font>
<input type=submit value=OK>
</form>";
include("footer.php3" );
}
function verif($nick0, $pass0)
{
include("mysql.php3" );
$mysql=mysql_query("SELECT * FROM team WHERE nick='$nick0'" );
while($row=mysql_fetch_array($mysql))
{
$pass1=$row[pass];
}
if ($pass0=='$pass1')
{
$expire = 365*24*3600;
setcookie("nick0","$nick0",time()+$expire);
setcookie("pass0","$pass0",time()+$expire);
header("Location: ../private.php3" );
exit();
}
else
{
form();
}
}
switch($op) {
case "form":
form();
break;
case "verif":
verif($nick0, $pass0);
break;
}
?>
Je ne pige pas. On dirait que le test if ($pass0=='$pass1')
ne fonctionne pas. Alors que ces deux variables sont identiques.
Plz Help Me c'est hyper urgent.