passwdCheck.asp
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<LINK rel="stylesheet" type="text/css" href="../boardStyle.css">
</HEAD>
<BODY onload="document.form.passwd.focus();"> ' 페이지로드시 커서포커스를 패스워드입력상자로..
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<form method=post action="passwdCheck2.asp" name=form>
<input type=hidden name= forum_idvalue="<%=Request.QueryString("forum_id")%>">
<input type=hidden name= pagevalue="<%=Request.QueryString("page")%>">
<input type=hidden name= novalue="<%=Request.QueryString("no")%>">
<input type=hidden name= jobvalue="<%=Request.QueryString("job")%>">
<TABLE border=1 borderColor=black cellPadding=5 cellSpacing=0
width="250" align=center>
<TR>
<TD align=middle><STRONG><FONT face=굴림
size=2 color=dimgray>비밀번호</FONT></STRONG></TD>
<TD align=middle><INPUT id=password1 name=passwd type=password size=8 maxlength=8></TD></TR>
</TABLE>
<p align=center><INPUT type="submit" value="확인" id=submit1 name=submit1> </p>
</form>
</BODY>
</HTML>
passwdCheck2.asp
<%@ Language=VBScript %>
<!--#include file="../dbconn.inc" -->
<%
forum_id=Request.Form("forum_id")
page=Request.Form("page")
pk_id=Request.form("no")
passwd=Request.Form("passwd")
job=Request.Form("job")
strSQL="select passwd from dbo_tbl_guestbook where pk_id="&pk_id ' 디비에서 해당 글의 비밀번호를 가져온다.
set cm=conn.execute(strSQL)
passwd2=cm(0)
set cm=nothing
if trim(passwd)=trim(passwd2) then
if job="edit" then
Response.Redirect "edit.asp?no="&pk_id '수정시
else
Response.Redirect "del.asp?no="&pk_id '삭제시
end if
else
Response.Redirect"../error.asp?err=passwd&forum_id="&forum_id ' 만약 비밀번호가 맞지 않을 경우 에러페이지로 이동
end if
%>
[출처] [펌] 제18강 - 방명록 만들기 VII|작성자 정신차렷
"쇼핑몰·홈페이지·오픈마켓
블로그·페이스북·이메일 등의 각종 마케팅 글쓰기, 각종 광고, 영업, 판매, 제안서, 전단지 반응율 3배×10배 이상 높이는 마법의 8단계 공식" |
☞자세히보기 |
|
|