+ -
当前位置:首页 → 问答吧 → CGI+SQlite实现简单用户登录

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>密 码:&nbsp;
  <label>
  <input name="password" type="password" id="password" />
  </label>
  <p>
  <label> <br>
  <input type="submit" name="Submit" value="login" />
  &nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;
  <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

热门下载

更多