require_once 'DB.php';
$dsn = 'mysql://rc:rc@localhost/rc';
$db =  & DB::connect($dsn);

if(DB::isError($db))
{
die($db->getMessage());
}
$sql = "select count(*) from users where email='".$_POST['email']."' and pwd='".$_POST['pwd']."'";
$result = & $db->query($sql);
if(DB::isError($result))
{
die($result->getMessage());

}
   $num = $result->numRows(); //这句总是返回1 不知道为什么,哪怕是空数据库
if($num >0)
{
session_start();
$_SESSION['islogin']= true;
header("location:rclist.php");
}