im working with my login and i don't know what my error is, i dont get any error when i run my login...
here's my code, please kinda look at whats the problem here..!! thanks!
Code: Select all
<?php
session_start();
include_once("connect.php");
if(isset($_POST['submit']))
{
$idno=$_POST[idno];
$pass=$_POST[pass];
$login=mysql_query("Select * from register where idno='$idno' and password='$pass'")or die (mysql_error());
if(mysql_num_rows($login)==0)
{
$msg="invalid";
}
else {
$_SESSION[idno]=$idno;
header("location: adminpage.php");
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="testlog.php" method="get">
idno<input name="idno" type="text" />
pass<input name="pass" type="text" />
<input name="submit" type="submit" />a
</form>
</body>
</html>