如何實(shí)現(xiàn)某一頁(yè)面只讓特定的用戶(hù)瀏覽?
protect.asp
<html>
<head>
<title>千花飛舞之春風(fēng)精彩</title>
</head>
<body bgcolor="#00FFFF">
<form action="Protect.asp" method="post">
' 精彩的要限制的頁(yè)面.
<input type="text" name="text">
' 此處可注明該頁(yè)面的其它內(nèi)容.
姓名:
<input type="password" size="20" name="password">
口令:
<input type="submit" name="B1" value="查詢(xún)"></p></form>
<%set conn=server.createobject("adodb.connection")
conn.open "asptest"
' asptest是存放客戶(hù)信息的表單permission所在的數(shù)據(jù)庫(kù)的名字.
sql1="select from permission where xm='"&&request.form("text") && "' and mima='"&&request.form ("password")&&"'"
set rs=conn.execute(sql1)%>
<% if not rs.eof then%><a href="jingcai.asp">春風(fēng)精彩</a>
' 如果數(shù)據(jù)庫(kù)中存在用戶(hù)輸入的姓名和口令,則顯示頁(yè)面jingcai.asp的鏈接.
<%end if%>
</body></html>
[1]
相關(guān)文章
如何編寫(xiě)一個(gè)過(guò)濾掉HTML代碼的函數(shù)?
如何編寫(xiě)一個(gè)過(guò)濾掉HTML代碼的函數(shù)?...2006-11-11何時(shí)將數(shù)據(jù)裝載到Application 或 Session 對(duì)象中去?
何時(shí)將數(shù)據(jù)裝載到Application 或 Session 對(duì)象中去?...2006-11-11如何實(shí)現(xiàn)人民幣的大寫(xiě)轉(zhuǎn)換?
如何實(shí)現(xiàn)人民幣的大寫(xiě)轉(zhuǎn)換?...2006-11-11