ClassicASP 자료 수정하기
페이지 정보
본문
<%@ Language=VBScript %>
<% Option Explicit %>
<%
set dbcon = Server.CreateObject("ADODB.Connection")
dbcon.Open "Provider=SQLOLEDB.1;Password=디비_비밀번호;Persist Security Info=True; User ID=디비_아이디; Initial Catalog=디비_이름; Data Source=디비_주소"
if session("id") = "" then
response.write "<script type=""text/javascript"">"
response.write "alert('정보가 다릅니다.');"
response.write "history.back();" ' 뒤로가기
'response.write "document.location.href = 'member_info.asp' " ' 특정페이지로 가기
response.write "</script>"
response.end
end if
Dim num, name, email, SQL
num = request("num")
name= request("name")
email = request("email")
sql = "update 테이블_이름 set "
sql = sql & " name= '"& name &"' "
sql = sql & ", email = '"& email &"' "
sql = sql & ", edate = '"& NOW() &"' "
sql = sql & " where num= '"& num &"' "
response.Write("sql=" & sql & "<br />")
dbcon.Execute(Sql)
dbcon.Close
set dbcon = Nothing
response.redirect "수정후_연결_페이지.asp"
%>
<% Option Explicit %>
<%
set dbcon = Server.CreateObject("ADODB.Connection")
dbcon.Open "Provider=SQLOLEDB.1;Password=디비_비밀번호;Persist Security Info=True; User ID=디비_아이디; Initial Catalog=디비_이름; Data Source=디비_주소"
if session("id") = "" then
response.write "<script type=""text/javascript"">"
response.write "alert('정보가 다릅니다.');"
response.write "history.back();" ' 뒤로가기
'response.write "document.location.href = 'member_info.asp' " ' 특정페이지로 가기
response.write "</script>"
response.end
end if
Dim num, name, email, SQL
num = request("num")
name= request("name")
email = request("email")
sql = "update 테이블_이름 set "
sql = sql & " name= '"& name &"' "
sql = sql & ", email = '"& email &"' "
sql = sql & ", edate = '"& NOW() &"' "
sql = sql & " where num= '"& num &"' "
response.Write("sql=" & sql & "<br />")
dbcon.Execute(Sql)
dbcon.Close
set dbcon = Nothing
response.redirect "수정후_연결_페이지.asp"
%>
댓글목록
등록된 댓글이 없습니다.