خرید بک لینک

Vote count: -1

i know this is simple..but i am unable to find the error..i have a login page where i take the input from user i.e. the useame and password.then another page i am checking whether the values are present in the database or not.but neither it is giving me an error nor its working..moreover its not entering the first if condition..if ($result->num_rows > 0)

<body style="background-color:lightgrey;">
<?php  
include('custdb.php');
session_start();


 $uname=$_POST['useame'];
 $pass=$_POST['password'];
$sql = "SELECT * FROM `info` WHERE `useame`='".$uname."';";
//echo $sql;

 $result = $co->query($sql);
echo"1";
echo $result;

if ($result->num_rows > 0) {
  echo"1";
 while($row = $result->fetch_assoc()) {


        if($uname==$row["useame"])
        {


           header("location:custprofile.php");
        }
        else
        {

           header("Location:custindex.php");
        }

}   



}
else
{
    echo "invalid input";
    echo '<h4 align="left"><a href="custindex.php">LOGIN</a> </h4>';    
}


?>

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 10 ارديبهشت 1395 ساعت: 16:45

صفحه بندی