日期:2014-05-17  浏览次数:20423 次

一下程序原本可以登录,为啥我加了自动登录部分(前面1-15行),系统检测不到用户资料后不显示登录界面出来,请帮忙看看,多谢了
<?php
include ('connect.php');
include ('loginchg.php');
//在登录前,先判断是否已经选择自动登录
$query="select * from netoa.users where Urname='{$_session['Username']}' and urPassword='{$_session['Password']}'";
// oci_free_statement($stmt);
$stmt=oci_parse($conn,$query);
$result= oci_execute($stmt);
if ($ruselt)
{
//如果session会话变量名与密码匹配,则自动登录
header('Location: http://localhost/index.php');
exit;
}
?>
<html>
<html  xmlns:v>
<style>
v\:*{behavior:url(#default#VML)}
</style>
<head>
<title>用户登陆</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
          <script language='JavaScript'>document.location.href="index.php";</script>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="10" onLoad="document.form1.user.focus();wopen()">
<table align="center" width="620" border="0" height="400" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" >
<form method="post" name="form1">
<tr>
<td width="300">
      <v:RoundRect  style="position:relative;width:300;height:400px" arcsize=0>
        <v:shadow  on="T"  type="single"  color="#b3b3b3"  offset="3px,3px"/>
        <v:TextBox  style="font-size:10.2pt;">
<table align=center width=300 height=400 cellspacing="0" cellpadding="0">
<tr>
<td align="center" height="30"></td>
</tr>
<tr>
<td align="center" width="290" height="30"> <font size="+3">系统</font> </td>
</tr>
<tr>
<td align="center" height="250"><IMG class=Ico src="logintu/logo3.gif"></td>
</tr>
<tr>
<td align="right" height="10">
<font style="font-size:9pt;">部门&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>
</td>
</tr>
<tr>
<td align="right" height="10">
<font style="font-size:9pt;">Copyright &copy; 2012&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>
</td>
</tr>
<tr>
<td align="center" height="10"></td>
</tr>
</table>
</td>
                </v:TextBox>
        </v:RoundRect>
<td width="20">&nbsp;</td>
<td width="300">
      <v:RoundRect  style="position:relative;width:300;height:400px" arcsize=0>
        <v:shadow  on="T"  type="single"  color="#b3b3b3"  offset="3px,3px"/>
<v:TextBox  style="font-size:10.2pt;">
<table align=center width=300 height=400 border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"&n