//login.php 負責處理用戶登錄與退出動作
if(!isset($_POST['submit'])){
exit('非法訪問!');
}
$username = htmlspecialchars($_POST['username']);
$password = MD5($_POST['password']);
//包含資料庫連接文件
include('conn.php');
//檢測用戶名及密碼是否正確
$check_query = mysql_query("select uid from user where username='$username' and password='$password' limit 1");
if($result = mysql_fetch_array($check_query)){
//登錄成功
$_SESSION['username'] = $username;
$_SESSION['userid'] = $result['uid'];
echo $username,' 歡迎你!進入 <a href="my.php">用戶中心</a>
';
echo '點擊此處 <a href="login.php?action=logout">注銷</a> 登錄!
';
exit;
} else {
exit('登錄失敗!點擊此處 <a href="javascript:history.back(-1);">返回</a> 重試');
}
註:上述源碼是在TP中的登錄驗證方法,供參考!!
2. 跪求java大神提供網站的登錄和注冊源代碼
需要的話可以發一份給你
你留個郵箱
3. 網站登錄源代碼怎莫看
在網站上點擊滑鼠右鍵出現:
點擊查看原文件即可。
希望能夠幫助你!
4. 怎樣獲得網站源代碼
朋友,仔細看了你的問題,我想你這個問題在你個人解決起來會比較麻煩,看起來你對網站技術還不是很了解,但我想你應該有很多解決方案:
方案一:用FTP下載他們所謂的源文件,下載後找個懂的朋友查看下他們是基於什麼系統做的網站,(一般小公司也就在市面上的CMS基礎上改吧改吧就說是自己的系統了),這種情況哪輪得到他們和你打官司?
方案二:如果他們還真牛,自己開發的網站程序,那也不打緊,你要問問目前你委託的這家公司,建站還需要拿客戶提供的源碼,這真是奇了怪了,哪有這么不專業的公司?或許他們也是初入行,想先看看別人開發的程序吧?所以這種情況,不仿換家公司試試(中企動力,得友網路,派桑網路..),其實普通網站開發對於專業人士來說真的不難哦,根本無需什麼源碼. 或者是你資料庫很大?這個倒是有可能的,那可以讓原來公司把資料庫備份給你。
方案三:上面說過不難的,你不如也可以自己學習網站建設,如果你不急的話。
祝你好運!
5. asp.net C# 登陸頁面 源碼
科技學院的?呵呵 這個不難 我也是科院的
6. 我注冊了域名買了空間和網站源碼程序,再如何操作
域名 你登錄萬網的域名解析系統裡面去解析你的域名。 一般是做A記錄到你的空間的ip
空間 你這邊需要登錄空間的控制面板 去綁定你的域名、
只有這樣 你的域名解析生效了才能去訪問你的網站程序、
最後一步 把你調試好的網站程序上傳到你的空間裡面。一般都是用ftp軟體的。上傳好了設置好了默認首頁就可以訪問了。
7. 求asp中的登錄注冊的源碼
分5個文件:
1:登錄頁面 login.htm
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登錄</title>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="33%" height="64" id="table1">
<form name="form" action="go.asp" method="post"><tr>
<td>用戶名:<input name="user"></td>
</tr>
<tr>
<td>密 碼:<input type="password" name="pwd"></td>
</tr>
<tr>
<td><input name="sub" value="登錄" type="submit"></td>
</tr></form>
</table>
</body>
</html>
------------------------
2.資料庫連接文件 conn.asp
<%set rs=server.createobject("adodb.recordset")
conn = "driver={Microsoft Access Driver (*.mdb)};DBQ="&server.mappath("data.mdb")
%>
-------------------------
3:登錄檢測頁面 go.asp
<!-- #include file="conn.asp" -->
<%
pwd=request.Form("pwd")
set rs=server.createobject("adodb.recordset")
sql="select * from user where name='"&request.Form("user")&"'"
rs.open sql,conn,1,1
if rs.eof or rs.bof then'如果用戶名不存在
response.Write"<script language=javascript>alert('請輸入正確的用戶名!');history.go(-1);</script>"
Response.End()
else
if rs("pwd")<>pwd then'如果密碼不對
response.write "<script language=JavaScript>alert('密碼有誤!');history.back();</script>"
else
response.write("登錄成功")'
end if
end if%>
-------------------------------
4。注冊文件 add.asp
<!-- #include file="conn.asp" -->
<%
sql="select * from user where u_user='"&request.Form("user")&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs.BOF or rs.EOF then
rs.addnew
rs("name")=request.Form("user")
rs("pwd")=request.Form("pwd")
rs.update
rs.close
set rs=nothing
response.Write ("注冊成功!")
else
rs.close
set rs=nothing
response.write ("此用戶已被注冊")
end if
%>
4。注冊頁面 re.htm
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>注冊</title>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="33%" height="64" id="table1">
<form name="form" action="add.asp" method="post"><tr>
<td>用戶名:<input name="user" size="23"></td>
</tr>
<tr>
<td>密 碼:<input name="pwd" size="23" id="pwd"></td>
</tr>
<tr>
<td><input name="sub" value="注冊" type="submit"></td>
</tr></form>
</table>
</body>
</html>
將這幾個文件和資料庫「data.mdb」放在同一目錄內
資料庫建一個USER表
含name pwd 兩個欄位 文本類型
運行login.htm測試登錄
運行re.htm測試注冊
8. 易語言怎麼寫注冊登錄 就是把編輯1和編輯2提交到網站的登錄頁面,然後把登錄結果反還回來 求源碼
花了十幾分鍾幫您寫了一個, 登錄和訊網的源碼
用到的工具有,httpwath7.0這個工具,還有精易模塊,發生了一個小插曲,用精易編程助手抓包抓不到,還是老外的東西好用,很多網站大同小易,一樣的操作,看源碼吧,
源碼給你打包到你的郵箱中了,
9. asp網站注冊登陸代碼
簡單點的 就是兩個文本框 再的話 加個驗證碼
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/conn.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername = CStr(Request.Form("textfield"))
If MM_valUsername <> "" Then
Dim MM_fldUserAuthorization
Dim MM_redirectLoginSuccess
Dim MM_redirectLoginFailed
Dim MM_loginSQL
Dim MM_rsUser
Dim MM_rsUser_cmd
MM_fldUserAuthorization = ""
MM_redirectLoginSuccess = "../HTAI/index.asp"
MM_redirectLoginFailed = "dlsb.asp"
MM_loginSQL = "SELECT name, pass"
If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
MM_loginSQL = MM_loginSQL & " FROM zc WHERE name = ? AND pass = ?"
Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
MM_rsUser_cmd.ActiveConnection = MM_conn_STRING
MM_rsUser_cmd.CommandText = MM_loginSQL
MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 50, MM_valUsername) ' adVarChar
MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 50, Request.Form("textfield2")) ' adVarChar
MM_rsUser_cmd.Prepared = true
Set MM_rsUser = MM_rsUser_cmd.Execute
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<style type="text/css">
<!--
.s {
height: 18px;
width: 180px;
}
-->
</style>
</head>
<body bgcolor="#000000" text="#FFFFFF"><table><tr><th height="10"></th></tr></table>
<form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
<table width="452" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th height="25" colspan="2" scope="col">用戶登錄</th>
</tr>
<tr>
<td width="172" height="25" align="right">用戶名:</td>
<td width="280" height="25"><label>
<input name="textfield" type="text" class="s" id="textfield" />
</label></td>
</tr>
<tr>
<td height="25" align="right">密碼:</td>
<td height="25"><label>
<input name="textfield2" type="password" class="s" id="textfield2" />
</label></td>
</tr>
<tr>
<td height="25"></td>
<td height="25"><label>
<input type="submit" name="button" id="button" value="登錄" />
<input type="reset" name="button2" id="button2" value="重置" />
</label></td>
</tr>
</table>
</form>
</body>
</html>
10. ASP.NET招生平台系統源碼|招生網站源碼賬號怎麼注冊
招生系統用戶是不需要注冊,可以直接使用身份證和考生號進行登錄。