《电子电脑》显示文章详细内容: [展开] [回复] [网址] [举报] [屏蔽]
大白鼠
大白鼠目前处于离线状态
等    级:长老
经 验 值:1295
魅 力 值:186
龙    币:2783
积    分:1445.9
注册日期:2001-12-02
 
  查看大白鼠个人资料   给大白鼠发悄悄话   将大白鼠加入好友   搜索大白鼠所有发表过的文章   给大白鼠发送电子邮件      

请教高手帮我看看程序呀
本人初学做网页就卡住了,知道这里高手很多,特来请教,下面的程序看上去很简单,怎么我运行以后,点按钮,什么反应都没有呢?帮我看看是哪错了。先谢过了。

<?
if ($register=="yes")
{
if ($userid!="")
{
$db_id=mysql_connect("localhost", "root", "123456");
//判断用户名和密码是否在正确
$result=mysql_db_query("work","SELECT userid,password FROM userinfo WHERE userid='$userid' and password='$passwd'");
//数据库名是work,表名是userinfo
$num=mysql_numrows($result);
mysql_close($db_id);
if($num>0)
{
echo "<center>登录成功!</center><br>";
}
else echo "<center><font color=red>登录失败!请检查用户名和密码!</font></center><br>";
}
}
?>

<html>
<head>
<title>用户登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#EBEBEB" topmargin="1">
<form action="right.php" method="post">
<font size="1" color=Black>

<?
$cweekday=array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
$now=getdate(time());
$cur_wday=$now['wday'];
$showtime=date("Y年m月d日 $cweekday[$cur_wday]");
print $showtime
?>

 用户名<input name="userid" type="text" maxlength="8" size="10">
 密码<input name="passwd" type="password" maxlength="8" size="10">
<input name="register" type="hidden" value="yes">
<input class=input name="submit" type="submit" value="登录">
尚未注册或忘记密码请与管理员联系
</font>
<hr color="Olive">
</form>
</body>
</html>

--
我家就在回龙观
2006-03-16 18:31:02   此文章已经被查看236次   
 相关文章: [回复]  [顶端] 



  您必须登录论坛才可以发表文章:
 
用户名:   密码:   记住密码:    (忘记密码 注册




版权所有 回龙观社区网 经营许可证编号:京B2-20201639 昌公网安备1101140035号

举报电话:010-86468600-5 举报邮箱: