میدونید مشکل چیه؟
مشکل اینجا هست که من تکه کد زیر را نوشتم نه از من خطا می گیره نه درست کار می کنه دیگه اعصابم رو داره خورد میکنه
<?
$oklogin=false;
include("../include/connect.php");
if (isset($HTTP_COOKIE_VARS['c_user']) && isset($HTTP_COOKIE_VARS['c_pass'])){
$user_name=$HTTP_COOKIE_VARS['c_user'];
$password=$HTTP_COOKIE_VARS['c_pass'];
$select="select * from user where username='$user_name' and password='$password'";
$query=mysql_query($select);
$result=mysql_num_rows($query);
if ($result<=0){
setcookie ("c_user", '',time()+36000);
setcookie ("c_pass", '',time()+36000);
}
}
if (isset($_REQUEST['_submit'])){
$user_name = htmlspecialchars($_REQUEST["username"]);
$password = htmlspecialchars($_REQUEST["passwords"]);
echo $user_name;
}
?>
<html >
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1256">
<title>ورود</title>
</head>
<body>
<script>
function chek()
{
var form=document.loginform;
if (form.username.value==''){
alert('نام کاربري خود را وارد کنيد');
return false;
}
if (form.passwords.value==''){
alert('پسورد خود را وارد کنيد');
return false;
}
}
</script>
<form action="signin.php" method="POST" name="loginform" >
<table align="center" width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table align="center" cellpadding="0" cellspacing="0">
<tr>
<td><input name="username" type="text" tabindex="1" maxlength="20" /></td>
<td align="right"> : نام کاربري </td>
</tr>
<tr>
<td><input name="passwords" type="password" tabindex="2" maxlength="20" /></td>
<td align="right" > : رمز عبور </td>
</tr>
<tr>
<td></td>
<td><input type="button" name="okbutton" value="ورود" tabindex="3" onclick="return chek()" /></td>
</tr>
</table>
</td>
</tr>
</table>
<input name="_submit" type="hidden" value="yes" />
</form>
</body>
</html>