|
|
|
|
ÀÌ»ÛÀÌ / 2000-05-22 / ¿ÀÀü 9:52:31 / 203.248.144.11
Á¶È¸¼ö : 117
|
[Áú¹®] ¸Ó¸®±Û¿À·ù¿¡ °üÇÑ ÀçÁú¹®....x); |
c_insert.asp
<%response.buffer = true%>
<%
Set DbCon = Server.CreateObject("ADODB.Connection")
DbCon.Open ("DSN=ASP;UID=sa;PWD=;")
SQLString = "SELECT MAX(no) FROM asptable"
Set Result = DbCon.Execute( SQLString )
MaxNO = Result(0) + 1
subject = Request("subject")
subject = Replace(subject, "'","''")
If subject="" Then
session("msg")="Á¦¸ñ ¾Ê½è³×¿ä... ^^;"
Redirect
End If
writer = Request("writer")
If writer="" Then
session("msg")="À̸§ ¾Ê¾²¸é ´©°¡ ½è´ÂÁö ¸ð¸£Áö¿ä!"
Redirect
End If
content = Replace(Request("content"), "'","''")
If content ="" Then
session("msg")="³»¿ëÀ» ½á¾ßÁö¿ä? ¶¨..."
Redirect
End If
email= Request("email")
If email ="" Then
email = " "
End If
passwd = Request("passwd")
If passwd ="" Then
passwd = " "
End If
sql="INSERT INTO asptable (no,subject,writer,email,visited,date,passwd,content)"
sql=sql &"values ("& MaxNO & ",'"
sql=sql & subject &"','"
sql=sql & writer &"','"
sql=sql & email &"',0,'"
sql=sql & date &"','"
sql=sql & passwd &"','"
sql=sql & content &"')"
Set Result = DbCon.Execute(sql)
DbCon.Close
Response.Redirect "c_InsertResult.htm"
%>
¸ÇÀ§¿¡ ³»¿ëó·³ <%response.buffer =true%>¶ó°í Çߴµ¥ ¿ª½Ã ¶È°°Àº error message°¡ ³ª¿Í source¸¦ ¿Ã¸³´Ï´Ù....
ºü¸¥ ´äº¯ ºÎŹµå¸³´Ï´Ù...
|
|
|
|