session_start(); require_once("include/function.php"); $conn=DBConnect(); $r="select * from user where idadmin=1"; $rr=odbc_exec($conn,$r); $row=odbc_fetch_array($rr); $password=$row['password']; $userid=$row['user']; if(isset($_POST['user'])) $user=$_POST['user']; else $user=""; if(isset($_POST['pwd'])) $pwd=$_POST['pwd']; else $pwd=""; if($user==$userid && $pwd==$password){ $_SESSION['user']="ok"; header("Location:index.php"); } else{ ?>