NiMble_m
یک شنبه 30 مرداد 1390, 11:00 صبح
سلام خسته نباشید
میشه لطف کنید بگید ایراد این کد من چیه
میخوام بعد از اینکه کاربر نام و پسورد داد به صفحه مورد نظر ولی خطا میده
من روی لوکال هاست دارم کار میکنم
<?php
$user=$_POST ['a'];
$cod=$_POST ['b'];
$noe= $_POST['danesh'];
$conn = mysql_connect('localhost','root','');
mysql_select_db('froosh',$conn);
if ($noe=="stu") {
$sql =" select user from vorod where user='$user' and cod='$cod' ";
$result = mysql_query($sql,$conn);
if (@mysql_result($result,0,0)) header('Location : namayesh.php');
else
header('Location : no.php');
}else{
$sql =" select user from moalem where user='$user' and cod='$cod' ";
$result = mysql_query($sql,$conn);
if (@mysql_result($result,0,0)) header('Location : lmoalem.php');
else
header('Location : no.php');
}
?>
ممنون میشم جواب بدید
میشه لطف کنید بگید ایراد این کد من چیه
میخوام بعد از اینکه کاربر نام و پسورد داد به صفحه مورد نظر ولی خطا میده
من روی لوکال هاست دارم کار میکنم
<?php
$user=$_POST ['a'];
$cod=$_POST ['b'];
$noe= $_POST['danesh'];
$conn = mysql_connect('localhost','root','');
mysql_select_db('froosh',$conn);
if ($noe=="stu") {
$sql =" select user from vorod where user='$user' and cod='$cod' ";
$result = mysql_query($sql,$conn);
if (@mysql_result($result,0,0)) header('Location : namayesh.php');
else
header('Location : no.php');
}else{
$sql =" select user from moalem where user='$user' and cod='$cod' ";
$result = mysql_query($sql,$conn);
if (@mysql_result($result,0,0)) header('Location : lmoalem.php');
else
header('Location : no.php');
}
?>
ممنون میشم جواب بدید