當前位置:首頁 » 數據倉庫 » 免費登錄界面資料庫源碼
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

免費登錄界面資料庫源碼

發布時間: 2022-08-04 16:06:03

㈠ 用戶登錄 asp+sql源碼

資料庫建立一個表admin 3個列:Username Passwd oskey(用戶級別)
ODBC數據源創建一個sql的數據源與你建立的資料庫連上。
conn.asp
<%
set conn=server.createobject("adodb.connection")
conn.connectionstring="DSN=ccsw;uid=sa;pwd=1234"
conn.open
%>
index.asp
<html>

<head>
<title>管理登錄</title>
<link rel="stylesheet" href="style.CSS">
<style type="text/css">
<!--
.style1 {color: #9966FF}
.style2 {
font-size: 12pt;
font-weight: bold;
color: #9966FF;
}
.style3 {
font-size: 12pt;
color: #0033CC;
}
.style4 {color: #0000CC}
-->
</style>
</head>

<body>
<div align="center"><center>

<table border="0" cellspacing="1" width="90%">
<tr>
<td> <form method="post" action="chklogin.asp">
<table width="300" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="30" colspan="2" align="right"><div align="center" class="style1 style3"><strong>管理登錄</strong></div></td>
</tr>
<tr>
<td width="33%" align="right" height="30"><span class="style4">用戶名:</span></td>
<td width="67%">
<input name="UserName" maxlength="20" class="smallInput" size="20">
</td>
</tr>
<tr>
<td width="33%" align="right" height="30"><span class="style4">密 碼:</span></td>
<td width="67%">
<input type="password" name="Passwd" maxlength="16" class="smallInput"
size="20">
</td>
</tr>
<tr>
<td colspan="2" height="15"></td>
</tr>
</table>
</td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="31" bgcolor="#9999FF">
<input type="submit" name="Submit" value="確定" class="buttonface">

<input type="reset" name="Submit2" value="重寫" class="buttonface"></td>
</tr>
</table>
</form>
<p align="center">後台登錄</td>
</tr>
</table>
</center></div>
</body>
</html>
檢查用戶界面:
<!--#include file=articleconn.asp-->
<%
dim rs
UserName1=request.form("UserName")'獲得登錄界面輸入的用戶名
Passwd1=request.form("PassWd")''獲得登錄界面輸入的密碼
set rs=server.CreateObject("ADODB.RecordSet")'建立資料庫連接
rs.open "select * from admin where UserName='" & UserName1 & "' and passwd='"&passwd1&"'",conn,1 '查詢該用戶名和密碼是否存在
if rs.eof or rs.bof then '當沒有符合篩選結果時,則執行下面的句子
response.write "<script language=javascript>"
response.write "alert('用戶或密碼不對!');"
response.write "javascript:history.go(-1);"
response.write "</script>" '用javascript腳本提示用戶
else '如果符合條件的時候
session("UserName")=RS("Username") '新建session,值等於表單傳來的用戶名
session("KEY")=rs("OSKEY")
response.write"<SCRIPT language=JavaScript>alert('登錄成功');"
response.write"this.location.href='admin.asp';</SCRIPT>"
end if '結束if語句
%>

㈡ asp.net C# 登陸頁面 源碼

程序不復雜,去網上當一個

㈢ 誰有會員登錄系統網頁代碼+mysql資料庫(5頁就好)

給她錢了

㈣ php寫一個登陸界面並且保存到資料庫,實現1天免登陸,求源碼

login.php
<!doctype html public "-//W3C//dtd html 4.01 transitional//en" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>

<body>
<form name="form1" method="post" action="confirm.php">
<p>用戶名:<input type="text" name="user"></p>
<p>密碼:<input type="password" name="pwd"></p>
<p><input type="submit" name="b1"></p>
</form>
</body>
</html>

㈤ C#如何運用ACCSEE資料庫製作一個登錄、注冊的界面,代碼是怎麼樣的

不知道你有沒有使用過SQL Server資料庫,其實語句都是一樣的呀,只不過鏈接的資料庫的字元串不一樣。
SQL Server資料庫:string connectionString = "Data Source=localhost; Initial catalog=JXC_DB; User Id=sa; Password=sa";
Access資料庫:string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="Access資料庫路徑";
還有,就是操作資料庫的命名空間和類有所區別。如
SQL Server資料庫:using System.Data.SqlClient;
Access資料庫:using System.Data.OleDb;
僅此而已

㈥ 求一個visual studio2012編寫登錄界面與sql server2012資料庫連接的源碼

網上很多這樣的代碼吧,網路一下sqlconnection你就發現新大陸了。

㈦ 求c#注冊登錄界面源代碼(全部包括SQL資料庫)

我寫了一個登錄的程序,界面也做的還可以,寫了號幾天呢。20分把這么多代碼寫給你不太可能吧,這里也放不下

㈧ 求html登陸界面代碼,要連接資料庫的

<p
style="font-size:
45px;
color:
#FF9;
font-weight:
bold;
text-align:
center;">用戶登錄
</p>
<form
name="form1"
method="post"
action="loginok.asp"><table
width="292"
align="center">
<tr>
<td
align="center">用戶名:
<label
for="user"></label></td>
<td><input
name="user"
type="text"
id="user"
size="15"></td>
</tr>
<tr>
<td
align="center">密碼:

<label
for="psw2"></label></td>
<td><input
name="psw1"
type="password"
id="psw1"
size="15"></td>
</tr>
<tr>
<td
align="center"></td>
<td><input
type="submit"
name="button"
id="button"
value="登錄">
<input
type="reset"
name="button2"
id="button2"
value="重置"></td>
</tr>
</table>
</form>
這是連接資料庫那部分的代碼,自己做的。下面是效果圖。之後還要做個登錄成功的跳轉頁面。還有前面有人提了,動態網頁要保存為.asp格式。
更多資料可以參考:www.wm23.cn/jopong

㈨ jsp登陸界面源代碼

1、login.jsp文件

<%@ page language="java" contentType="text/html; charset=GB18030"

pageEncoding="GB18030"%>

<%@ page import="java.util.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>登錄頁面</title>

</head>

<body>

<form name="loginForm" method="post" action="judgeUser.jsp">

<table>

<tr>

<td>用戶名:<input type="text" name="userName" id="userName"></td>

</tr>

<tr>

<td>密碼:<input type="password" name="password" id="password"></td>

</tr>

<tr>

<td><input type="submit" value="登錄" style="background-color:pink"> <input

type="reset" value="重置" style="background-color:red"></td>

</tr>

</table>

</form>

</body>

</html>

2、judge.jsp文件

<%@ page language="java" contentType="text/html; charset=GB18030"

pageEncoding="GB18030"%>

<%@ page import="java.util.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>身份驗證</title>

</head>

<body>

<%

request.setCharacterEncoding("GB18030");

String name = request.getParameter("userName");

String password = request.getParameter("password");

if(name.equals("abc")&& password.equals("123")) {

3、afterLogin.jsp文件

%>

<jsp:forward page="afterLogin.jsp">

<jsp:param name="userName" value="<%=name%>"/>

</jsp:forward>

<%

}

else {

%>

<jsp:forward page="login.jsp"/>

<%

}

%>

</body>

</html>

<%@ page language="java" contentType="text/html; charset=GB18030"

pageEncoding="GB18030"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>登錄成功</title>

</head>

<body>

<%

request.setCharacterEncoding("GB18030");

String name = request.getParameter("userName");

out.println("歡迎你:" + name);

%>

</body>

</html>

(9)免費登錄界面資料庫源碼擴展閱讀:

java web登錄界面源代碼:

1、Data_uil.java文件

import java.sql.*;

public class Data_uil

{

public Connection getConnection()

{

try{

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

}catch(ClassNotFoundException e)

{

e.printStackTrace();

}

String user="***";

String password="***";

String url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=***";

Connection con=null;

try{

con=DriverManager.getConnection(url,user,password);

}catch(SQLException e)

{

e.printStackTrace();

}

return con;

}

public String selectPassword(String username)

{

Connection connection=getConnection();

String sql="select *from login where username=?";

PreparedStatement preparedStatement=null;

ResultSet result=null;

String password=null;

try{

preparedStatement=connection.prepareStatement(sql);

preparedStatement.setString(1,username);

result=preparedStatement.executeQuery();//可執行的 查詢

if(result.next())

password=result.getString("password");

}catch(SQLException e){

e.printStackTrace();

}finally

{

close(preparedStatement);

close(result);

close(connection);

}

System.out.println("找到的資料庫密碼為:"+password);

return password;

}

public void close (Connection con)

{

try{

if(con!=null)

{

con.close();

}

}catch(SQLException e)

{

e.printStackTrace();

}

}

public void close (PreparedStatement preparedStatement)

{

try{

if(preparedStatement!=null)

{

preparedStatement.close();

}

}catch(SQLException e)

{

e.printStackTrace();

}

}

public void close(ResultSet resultSet)

{

try{

if(resultSet!=null)

{

resultSet.close();

}

}catch(SQLException e)

{

e.printStackTrace();

}

}

}

2、login_check.jsp:文件

<%@ page language="java" contentType="text/html; charset=utf-8"

pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>驗證用戶密碼</title>

</head>

<body>

<jsp:useBean id="util" class="util.Data_uil" scope="page" />

<%

String username=(String)request.getParameter("username");

String password=(String)request.getParameter("password");

if(username==null||"".equals(username))

{

out.print("<script language='javaScript'> alert('用戶名不能為空');</script>");

response.setHeader("refresh", "0;url=user_login.jsp");

}

else

{

System.out.println("輸入的用戶名:"+username);

String passwordInDataBase=util.selectPassword(username);

System.out.println("密碼:"+passwordInDataBase);

if(passwordInDataBase==null||"".equals(passwordInDataBase))

{

out.print("<script language='javaScript'> alert('用戶名不存在');</script>");

response.setHeader("refresh", "0;url=user_login.jsp");

}

else if(passwordInDataBase.equals(password))

{

out.print("<script language='javaScript'> alert('登錄成功');</script>");

response.setHeader("refresh", "0;url=loginSucces.jsp");

}

else

{

out.print("<script language='javaScript'> alert('密碼錯誤');</script>");

response.setHeader("refresh", "0;url=user_login.jsp");

}

}

%>

</body>

</html>

3、loginSucces.jsp文件

<%@ page language="java" contentType="text/html; charset=utf-8"

pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

</head>

<body>

<hr size="10" width="26%" align="left" color="green">

<font size="6" color="red" >登錄成功 </font>

<hr size="10" width="26%" align="left" color="green">

</body>

</html>

4、user_login.jsp文件

<%@ page language="java" contentType="text/html; charset=utf-8"

pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>登錄界面</title>

</head>

<body background="C:Userswin8workspaceLoginimage\_10.jpg" >

<center>

<br><br><br><br><br><br>

<h1 style="color:yellow">Login</h1>

<br>

<form name="loginForm" action="login_check.jsp" method="post">

<table Border="0" >

<tr >

<td>賬號</td>

<td><input type="text" name="username"></td>

</tr>

<tr>

<td>密碼</td>

<td><input type="password" name="password">

</td>

</tr>

</table>

<br>

<input type="submit" value="登錄" style="color:#BC8F8F">

</form>

</center>

</body>

</html>