以下是我的一个新闻系统的后台登录页面的源码。请教高手,为什么我输入密码后总是无法登录?密码是test
下面是config.inc.php的源码
<?
//设置管理员密码
$config_password="test";
//程序所在目录
$config_url="http://bbs.njpengwei.com/enreach/enreach-ch/news";
// 数据库信息
$dbhost = "zl"; // 数据库主机名
$dbuser = "root"; // 数据库用户名
$dbpasswd =""; // 数据库密码
$dbname = "zl"; // 数据库名
$con=mysql_connect($dbhost,$dbuser,$dbpasswd);
mysql_select_db($dbname,$con);
?>
-------------------------------------------------------------------------
下面是enreach_login.php文件的源码,也就是后台登录管理的页面
<?
require("config.inc.php");
if($isadmin!="yes"){
if($password==$config_password){
setCookie('isadmin','yes',0,'/');
echo "<script>window.location.href=\"enreach_addnews.php\"</script>";
}
?>
<HTML>
<HEAD>
<TITLE>EnReach新闻系统</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY BGCOLOR=#94C329 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (未命名-1.tif) -->
<TABLE WIDTH=410 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0 id="blue_font">
<TR>
<TD> <IMG SRC="images/enreachnews_01.gif" WIDTH=410 HEIGHT=25 ALT=""></TD>
</TR>
<TR>
<TD height="88" align="center" background="images/enreachnews_02.gif">
<form action="enreach_login.php" name="loginform" method="post">
请输入密码登录:
<input name="password" type="text" id="password">
<INPUT name="提交" type="submit" style="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee" value="提交" >
</form>
</TD>
</TR>
<TR>
<TD> <IMG SRC="images/enreachnews_04.gif" WIDTH=410 HEIGHT=30 ALT=""></TD>
</TR>
</TABLE>
<!-- End ImageReady Slices -->
</BODY>
</HTML>
<?
}else
echo "<script>window.location.href=\"enreach_addnews.php\"</script>";
?>