include "connect.php";
$sql="select*from tb_teacher where username='$user_login' and password='$pass_login'";
$result=mysql_db_query($dbname,$sql);
$num=mysql_num_rows($result);
mysql_close();
if ($num<=0) {
include "connect.php";
$sql="select*from tb_student where id='$user_login' and card='$pass_login'";
$result=mysql_db_query($dbname,$sql);
$num=mysql_num_rows($result);
mysql_close();
} if ($num<=0) {
echo "";
} else {
session_start();
$_SESSION[sess_userid]=session_id();
$_SESSION[sess_username]=$user_login;
header("Location:viewst.php");