لخبراء php أريد مساعدة حول setcookie
---------------------------------------------------
| خارج الموضوع... قلوا لي: ما معنى السوالف؟ |
---------------------------------------------------
This script I wrote, there no error messages, it's display "WELCOME USER" message but without set cookie.
really I don't where is my wrong... I run this script on Lyocs.co.uk
Best regard 
<?
include ("data.php");
$query = "SELECT * FROM users WHERE user LIKE '%$username%'";
$result = mysql_query($query, $db);
$num_rows = mysql_num_rows($result);
if ($num_rows==1)
{
$sql="SELECT * FROM users WHERE user LIKE '%$username%'";
$res=mysql_query($sql, $db);
while ($record = mysql_fetch_object ($res))
{
if ($password==$record->password)
{
Setcookie("login","user",time()+86400);
print "Welcome $username";
}
else
{
print "<h1>Bad Password, Try again</h1>";
}
}
mysql_free_result ($res);
}
else
{
print "<h1>Username Wrong!</h1>";
}
include ("foot.php");
?>
__________________
The box said: "Requires Windows 98/2000/XP/NT, or better" So, I installed LINUX