CGI+SQlite实现简单用户登录
时间:2010-05-07
来源:互联网
web服务器用的boa,数据库是SQLite3,html网页已编好,哪位高人能帮忙编写CGI程序用来check数据库,从而实现用户登录。只有用户名和密码两项。不胜感激。
html码如下:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>嵌入式Web服务器用户登陆</title>
<style type="text/css">
<!--
.STYLE2 {font-size: xx-large}
.STYLE5 {font-weight: bold; font-size: x-large;}
body {
background-color: #669933;
}
body,td,th {
color: #660000;
}
-->
</style>
</head>
<body>
<div align="center" class="STYLE5"><BR>
<BR>
<span class="STYLE2">欢迎登陆嵌入式Web服务器 </span><BR>
<BR>
</div>
<BR>
<BR>
<BR>
<BR>
<BR>
<form id="form1" name="form1" method="post" action="login2.cgi">
<table width="456" height="179" border="1" align="center" bordercolor="#333333">
<tr> </tr>
<tr>
<td height="179" align="center" bgcolor="#669933"> 用户名:
<label>
<input name="username" type="text" id="username" />
</label>
<p>密 码:
<label>
<input name="password" type="password" id="password" />
</label>
<p>
<label> <br>
<input type="submit" name="Submit" value="login" />
<input name="close" type="submit" id="close" onClick="window.close()" value="close" />
</label>
</td>
</tr>
</table>
</form>
</body>
</html>
html码如下:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>嵌入式Web服务器用户登陆</title>
<style type="text/css">
<!--
.STYLE2 {font-size: xx-large}
.STYLE5 {font-weight: bold; font-size: x-large;}
body {
background-color: #669933;
}
body,td,th {
color: #660000;
}
-->
</style>
</head>
<body>
<div align="center" class="STYLE5"><BR>
<BR>
<span class="STYLE2">欢迎登陆嵌入式Web服务器 </span><BR>
<BR>
</div>
<BR>
<BR>
<BR>
<BR>
<BR>
<form id="form1" name="form1" method="post" action="login2.cgi">
<table width="456" height="179" border="1" align="center" bordercolor="#333333">
<tr> </tr>
<tr>
<td height="179" align="center" bgcolor="#669933"> 用户名:
<label>
<input name="username" type="text" id="username" />
</label>
<p>密 码:
<label>
<input name="password" type="password" id="password" />
</label>
<p>
<label> <br>
<input type="submit" name="Submit" value="login" />
<input name="close" type="submit" id="close" onClick="window.close()" value="close" />
</label>
</td>
</tr>
</table>
</form>
</body>
</html>
作者: lveloveyan 发布时间: 2010-05-07
cgi ? c? vb? ...
作者: ok999ok 发布时间: 2010-05-10
楼主我只是知道js读取xml。cgi来操作数据库生成xml来判断,这样太麻烦,可以直接cgi来操作数据库,至于比较的格式可以是json
作者: lieri111 发布时间: 2010-05-10
把cgi当成普通程序,来直接操作数据库。
作者: xiaoshun123 发布时间: 2010-05-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28