묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
게시판을 한개 짜고 다른 기능들은 구현이 다 되었는데 수정이 제대로 안되네요..ㅜ_ㅜ
-----modipy.asp---------------------------------------------------------------------------------
<!-- #include file = "../inc/dbcon.inc" -->
<%
id=request("id")
pass=request("pass")
set rs=server.createobject("adodb.recordset")
rs.open "select f_pwd from board_free where f_id="&id,dbcon,1,2
if pass <> rs("f_pwd") then
%>
<script language="javascript">
<!--
alert("비밀번호가 일치하지 않습니다.")
history.back()
-->
</script>
<%else
set rs=server.createobject("adodb.recordset")
rs.open "select * from board_free where f_id="&id,dbcon,1,2
%>
<html>
<head>
<title>서울산업대학교 환경공학과 동문회</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<script language="JavaScript">
<!--
function sendit()
{
if(myform.name.value=="")
{
alert("이름을 입력해 주세요..")
myform.name.focus()
return
}
if(myform.subject.value=="")
{
alert("제목을 입력해 주세요..")
myform.subject.focus()
return
}
if(myform.content.value=="")
{
alert("내용을 입력해 주세요..")
myform.content.focus()
return
}
if(myform.pwd.value=="")
{
alert("암호를 입력해 주세요..n수정/삭제시 필요합니다..")
myform.pwd.focus()
return
}
myform.submit()
}
//-->
</script>
<link rel="stylesheet" href="../css/text.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/m_l_m_02_2.gif','images/m_l_m_03_3.gif','images/m_m_01_1.gif','images/m_m_02_1.gif','images/m_m_03_1.gif','images/m_m_04_1.gif','images/m_m_05_1.gif','images/sub_menu_r_02.gif')">
<table width="851" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="37" colspan="2">
<table width=851 border=0 cellpadding=0 cellspacing=0 height="37">
<tr>
<td><img src="images/top_logo.gif" width=260 height=37></td>
<td width="297"> </td>
<td><img src="images/top_m_01.gif" width="52" height="37"></td>
<td><img src="images/top_m_02.gif" width="51" height="37"></td>
<td><img src="images/top_m_03.gif" width="66" height="37"></td>
<td><img src="images/top_m_04.gif" width="69" height="37"></td>
<td><img src="images/top_m_05.gif" width="63" height="37"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="5" colspan="2">
<table width="851" height="5" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="543"></td>
<td bgcolor="#555555" width="308" height="5"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="35" colspan="2">
<table width="851" height="35" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="543">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="93"><img src="images/m_blank.gif" width=93 height=35></td>
<td width="96"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image321','','images/m_m_01_1.gif',1)"><img name="Image321" border="0" src="images/m_m_01.gif" width="96" height="35"></a></td>
<td width="98"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image331','','images/m_m_02_1.gif',1)"><img name="Image331" border="0" src="images/m_m_02.gif" width="98" height="35"></a></td>
<td width="110"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image341','','images/m_m_03_1.gif',1)"><img name="Image341" border="0" src="images/m_m_03.gif" width="110" height="35"></a></td>
<td width="71"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image351','','images/m_m_04_1.gif',1)"><img name="Image351" border="0" src="images/m_m_04.gif" width="71" height="35"></a></td>
<td width="75"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image361','','images/m_m_05_1.gif',1)"><img name="Image361" border="0" src="images/m_m_05.gif" width="75" height="35"></a></td>
</tr>
</table>
</td>
<td width="308">
<table width="308" border="0" cellspacing="0" cellpadding="0" height="35">
<tr>
<td width="67"><img src="images/search_t.gif" width=67 height=35></td>
<td width="78" bgcolor="#555555"><input type="text" name="textfield" size="9"></td>
<td width="55"><input type="image" border="0" name="imageField" src="images/search_i.gif" width="55" height="35"></td>
<td width="108"><input type="image" border="0" name="imageField2" src="images/search_ii.gif" width="108" height="35"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" height="1" colspan="2"></td>
</tr>
<tr>
<td height="130" colspan="2">
<table width="851" border="0" cellspacing="0" cellpadding="0" height="130">
<tr>
<td width="191" background="images/main_img_01.gif" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="191" height="98">
<param name=movie value="../swf/m_5.swf">
<param name=quality value=high>
<param name="wmode" value="transparent">
<embed src="../swf/m_5.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="191" height="98" wmode="transparent">
</embed>
</object></td>
<td width="660"><img src="images/main_img_02.jpg" width="660" height="130"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="191" background="images/m_l_bg.gif">
<table width="191" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.asp"><img src="images/sub_menu_r_01.gif" width="191" height="41" border="0"></a></td>
</tr>
<tr>
<td><a href="../board_qna/index.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image30','','images/sub_menu_r_02.gif',1)"><img name="Image30" border="0" src="images/sub_menu_02.gif" width="191" height="34"></a></td>
</tr>
</table>
</td>
<td valign="top" width="660" background="images/m_r_bg.gif">
<table width="660" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"> </td>
<td width="610"> </td>
<td width="25"> </td>
</tr>
<tr>
<td width="25"> </td>
<td width="610"><img src="images/b_sub_t_01.gif" width="150" height="30">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="2">
<tr>
<td width="25%" bgcolor="999999"></td>
<td width="75%" bgcolor="cccccc"></td>
</tr>
</table>
</td>
<td width="25"> </td>
</tr>
<tr>
<td width="25"> </td>
<td width="610"> </td>
<td width="25"> </td>
</tr>
<tr>
<td width="25"> </td>
<td width="610" align="center">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form name=myform method=post action=modify_ok.asp>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr bgcolor="#DEDEDE">
<td colspan="4" height="1"></td>
</tr>
<tr>
<td width=97 bgcolor=F7F9FC height=30 align="center">
<font color="#000000"> 글 제 목 </font></td>
<td height="25" colspan="3">
<input class=input style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid;
FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff"
name=subject size="73" value="<%=rs("f_subject")%>">
</td>
</tr>
<tr bgcolor="#DEDEDE">
<td colspan="4" height=1> </td>
</tr>
<tr>
<td width=97 bgcolor=F7F9FC height=30 align="center">
<font color="#000000"> 작 성 자</font></td>
<td width="173" height="25">
<input class=input style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid;
FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff"
name=name size="20" value="<%=rs("f_name")%>">
</td>
<td width=96 bgcolor=F7F9FC height=30 align="center">
<font color="#000000"> E-MAIL</font></td>
<td width="204" height="25">
<input class=input style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid;
FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff"
name=email size="28" value="<%=rs("f_email")%>">
</td>
</tr>
<tr bgcolor="#DEDEDE">
<td colspan="4" height=1> </td>
</tr>
<tr bgcolor="EAF0F8">
<td colspan="4" height=25 align="center"> <font color="#000000">내 용
</font> </td>
</tr>
<tr>
<td colspan="4" height=1 bgcolor="eeeeee"> </td>
</tr>
<tr>
<td height="240" colspan="4" align="center"> <font color="#000000">
</font>
<textarea class=textarea
style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; BACKGROUND-COLOR: #ffffff"
name="content" cols="90" rows="15"><%=rs("f_content")%></textarea>
</td>
</tr>
<tr bgcolor="#DEDEDE">
<td colspan="4" height="1"></td>
</tr>
<tr>
<td width=97 bgcolor=F7F9FC height=30 align="center">
<font color="#000000"> 비밀번호</font></td>
<td height="25" colspan="3">
<input class=input style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid;
FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff"
name=pwd size="20" value="<%=rs("f_pwd")%>">
</td>
</tr>
<tr bgcolor="#DEDEDE">
<td colspan="4" height="1"></td>
</tr>
<tr>
<td colspan="4" height="8"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width=210 height="28"> </td>
<input type=hidden name="id" value="<%=request("id")%>">
<td width=80 align="center"> <a href="javascript:sendit()"><img src="images/i_send.gif" width="47" height="19" border="0"></a></td>
<td width=70 align="center"> <a href="javascript:history.back();"><img src="images/i_cancel.gif" width="47" height="19" border="0"></a></td>
<td width=210> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
<td width="25"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="83" colspan="2">
<table width="851" border="0" cellspacing="0" cellpadding="0" height="83">
<tr>
<td rowspan="3" width="194" height="83"><img src="images/copy_logo.gif" width="194" height="83"></td>
<td height="35" width="657">
<table width=657 border=0 cellpadding=0 cellspacing=0>
<tr>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_01.gif" width=72 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_02.gif" width=73 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_03.gif" width=83 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()" ><img src="images/copy_m_04.gif" width=53 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_05.gif" width=53 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_06.gif" width=63 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_07.gif" width=81 height=35 border="0"></a></td>
<td><img src="images/copy_m_08.gif" width=179 height=35></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/copy2.gif" width="657" height="17"></td>
</tr>
<tr>
<td height="31">
<table width="657" border="0" cellspacing="0" cellpadding="0" height="31">
<tr>
<td width="581"><img src="images/copy1.gif" width="581" height="31"></td>
<td width="76"><a href="admin.html" onfocus="this.blur()" target="_blank"><img src="images/admin.gif" width="76" height="31" border="0"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
rs.close
dbcon.close
set rs=nothing
set dbcon=nothing
%>
<%end if%>
------------modify_ok.asp---------------------------------------------------------------------
<!-- #include file = "../inc/dbcon.inc" -->
<%
id=request("id")
name=request("name")
email=request("email")
subject=request("subject")
content=request("content")
name=replace(name,"'","''")
subject=replace(subject,"'","''")
content=replace(content,"'","''")
subject=replace(subject,"&","&")
subject=replace(subject,"<","<")
subject=replace(subject,">",">")
content=replace(content,"&","&")
content=replace(content,"<","<")
content=replace(content,">",">")
sql="update board_free set f_name='"&name&"',f_email='"&email&"',f_subject='"&subject&"',f_content='"&content&"' where f_id="&id
db.execute sql
dbcon.close
set dbcon=nothing
%>
<script language="javascript">
<!--
alert("글을 성공적으로 수정하였습니다.")
location.href="index.asp"
-->
</script>
같은 sql 명령을 쿼리분석기에서 직접 입력해보면 실행이 되는데,
뭐가 잘못된건지 알수가 없네요..ㅠ_ㅠ
작성한 게시판의 주소는 http://www.yearning.pe.kr/test/board_free/index.asp 입니다.
답변 부탁드립니다...
asp 질문입니당;;
2003.02.10 00:25
게시판을 한개 짜고 다른 기능들은 구현이 다 되었는데 수정이 제대로 안되네요..ㅜ_ㅜ
-----modipy.asp---------------------------------------------------------------------------------
<!-- #include file = "../inc/dbcon.inc" -->
<%
id=request("id")
pass=request("pass")
set rs=server.createobject("adodb.recordset")
rs.open "select f_pwd from board_free where f_id="&id,dbcon,1,2
if pass <> rs("f_pwd") then
%>
<script language="javascript">
<!--
alert("비밀번호가 일치하지 않습니다.")
history.back()
-->
</script>
<%else
set rs=server.createobject("adodb.recordset")
rs.open "select * from board_free where f_id="&id,dbcon,1,2
%>
<html>
<head>
<title>서울산업대학교 환경공학과 동문회</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<script language="JavaScript">
<!--
function sendit()
{
if(myform.name.value=="")
{
alert("이름을 입력해 주세요..")
myform.name.focus()
return
}
if(myform.subject.value=="")
{
alert("제목을 입력해 주세요..")
myform.subject.focus()
return
}
if(myform.content.value=="")
{
alert("내용을 입력해 주세요..")
myform.content.focus()
return
}
if(myform.pwd.value=="")
{
alert("암호를 입력해 주세요..n수정/삭제시 필요합니다..")
myform.pwd.focus()
return
}
myform.submit()
}
//-->
</script>
<link rel="stylesheet" href="../css/text.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/m_l_m_02_2.gif','images/m_l_m_03_3.gif','images/m_m_01_1.gif','images/m_m_02_1.gif','images/m_m_03_1.gif','images/m_m_04_1.gif','images/m_m_05_1.gif','images/sub_menu_r_02.gif')">
<table width="851" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="37" colspan="2">
<table width=851 border=0 cellpadding=0 cellspacing=0 height="37">
<tr>
<td><img src="images/top_logo.gif" width=260 height=37></td>
<td width="297"> </td>
<td><img src="images/top_m_01.gif" width="52" height="37"></td>
<td><img src="images/top_m_02.gif" width="51" height="37"></td>
<td><img src="images/top_m_03.gif" width="66" height="37"></td>
<td><img src="images/top_m_04.gif" width="69" height="37"></td>
<td><img src="images/top_m_05.gif" width="63" height="37"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="5" colspan="2">
<table width="851" height="5" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="543"></td>
<td bgcolor="#555555" width="308" height="5"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="35" colspan="2">
<table width="851" height="35" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="543">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="93"><img src="images/m_blank.gif" width=93 height=35></td>
<td width="96"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image321','','images/m_m_01_1.gif',1)"><img name="Image321" border="0" src="images/m_m_01.gif" width="96" height="35"></a></td>
<td width="98"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image331','','images/m_m_02_1.gif',1)"><img name="Image331" border="0" src="images/m_m_02.gif" width="98" height="35"></a></td>
<td width="110"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image341','','images/m_m_03_1.gif',1)"><img name="Image341" border="0" src="images/m_m_03.gif" width="110" height="35"></a></td>
<td width="71"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image351','','images/m_m_04_1.gif',1)"><img name="Image351" border="0" src="images/m_m_04.gif" width="71" height="35"></a></td>
<td width="75"><a href="#" onFocus="this.blur()"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image361','','images/m_m_05_1.gif',1)"><img name="Image361" border="0" src="images/m_m_05.gif" width="75" height="35"></a></td>
</tr>
</table>
</td>
<td width="308">
<table width="308" border="0" cellspacing="0" cellpadding="0" height="35">
<tr>
<td width="67"><img src="images/search_t.gif" width=67 height=35></td>
<td width="78" bgcolor="#555555"><input type="text" name="textfield" size="9"></td>
<td width="55"><input type="image" border="0" name="imageField" src="images/search_i.gif" width="55" height="35"></td>
<td width="108"><input type="image" border="0" name="imageField2" src="images/search_ii.gif" width="108" height="35"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" height="1" colspan="2"></td>
</tr>
<tr>
<td height="130" colspan="2">
<table width="851" border="0" cellspacing="0" cellpadding="0" height="130">
<tr>
<td width="191" background="images/main_img_01.gif" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="191" height="98">
<param name=movie value="../swf/m_5.swf">
<param name=quality value=high>
<param name="wmode" value="transparent">
<embed src="../swf/m_5.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="191" height="98" wmode="transparent">
</embed>
</object></td>
<td width="660"><img src="images/main_img_02.jpg" width="660" height="130"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="191" background="images/m_l_bg.gif">
<table width="191" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.asp"><img src="images/sub_menu_r_01.gif" width="191" height="41" border="0"></a></td>
</tr>
<tr>
<td><a href="../board_qna/index.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image30','','images/sub_menu_r_02.gif',1)"><img name="Image30" border="0" src="images/sub_menu_02.gif" width="191" height="34"></a></td>
</tr>
</table>
</td>
<td valign="top" width="660" background="images/m_r_bg.gif">
<table width="660" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"> </td>
<td width="610"> </td>
<td width="25"> </td>
</tr>
<tr>
<td width="25"> </td>
<td width="610"><img src="images/b_sub_t_01.gif" width="150" height="30">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="2">
<tr>
<td width="25%" bgcolor="999999"></td>
<td width="75%" bgcolor="cccccc"></td>
</tr>
</table>
</td>
<td width="25"> </td>
</tr>
<tr>
<td width="25"> </td>
<td width="610"> </td>
<td width="25"> </td>
</tr>
<tr>
<td width="25"> </td>
<td width="610" align="center">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form name=myform method=post action=modify_ok.asp>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr bgcolor="#DEDEDE">
<td colspan="4" height="1"></td>
</tr>
<tr>
<td width=97 bgcolor=F7F9FC height=30 align="center">
<font color="#000000"> 글 제 목 </font></td>
<td height="25" colspan="3">
<input class=input style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid;
FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff"
name=subject size="73" value="<%=rs("f_subject")%>">
</td>
</tr>
<tr bgcolor="#DEDEDE">
<td colspan="4" height=1> </td>
</tr>
<tr>
<td width=97 bgcolor=F7F9FC height=30 align="center">
<font color="#000000"> 작 성 자</font></td>
<td width="173" height="25">
<input class=input style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid;
FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff"
name=name size="20" value="<%=rs("f_name")%>">
</td>
<td width=96 bgcolor=F7F9FC height=30 align="center">
<font color="#000000"> E-MAIL</font></td>
<td width="204" height="25">
<input class=input style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid;
FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff"
name=email size="28" value="<%=rs("f_email")%>">
</td>
</tr>
<tr bgcolor="#DEDEDE">
<td colspan="4" height=1> </td>
</tr>
<tr bgcolor="EAF0F8">
<td colspan="4" height=25 align="center"> <font color="#000000">내 용
</font> </td>
</tr>
<tr>
<td colspan="4" height=1 bgcolor="eeeeee"> </td>
</tr>
<tr>
<td height="240" colspan="4" align="center"> <font color="#000000">
</font>
<textarea class=textarea
style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; BACKGROUND-COLOR: #ffffff"
name="content" cols="90" rows="15"><%=rs("f_content")%></textarea>
</td>
</tr>
<tr bgcolor="#DEDEDE">
<td colspan="4" height="1"></td>
</tr>
<tr>
<td width=97 bgcolor=F7F9FC height=30 align="center">
<font color="#000000"> 비밀번호</font></td>
<td height="25" colspan="3">
<input class=input style="BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid;
FONT-SIZE: 9pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff"
name=pwd size="20" value="<%=rs("f_pwd")%>">
</td>
</tr>
<tr bgcolor="#DEDEDE">
<td colspan="4" height="1"></td>
</tr>
<tr>
<td colspan="4" height="8"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width=210 height="28"> </td>
<input type=hidden name="id" value="<%=request("id")%>">
<td width=80 align="center"> <a href="javascript:sendit()"><img src="images/i_send.gif" width="47" height="19" border="0"></a></td>
<td width=70 align="center"> <a href="javascript:history.back();"><img src="images/i_cancel.gif" width="47" height="19" border="0"></a></td>
<td width=210> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
<td width="25"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="83" colspan="2">
<table width="851" border="0" cellspacing="0" cellpadding="0" height="83">
<tr>
<td rowspan="3" width="194" height="83"><img src="images/copy_logo.gif" width="194" height="83"></td>
<td height="35" width="657">
<table width=657 border=0 cellpadding=0 cellspacing=0>
<tr>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_01.gif" width=72 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_02.gif" width=73 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_03.gif" width=83 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()" ><img src="images/copy_m_04.gif" width=53 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_05.gif" width=53 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_06.gif" width=63 height=35 border="0"></a></td>
<td><a href="#" onfocus="this.blur()"><img src="images/copy_m_07.gif" width=81 height=35 border="0"></a></td>
<td><img src="images/copy_m_08.gif" width=179 height=35></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/copy2.gif" width="657" height="17"></td>
</tr>
<tr>
<td height="31">
<table width="657" border="0" cellspacing="0" cellpadding="0" height="31">
<tr>
<td width="581"><img src="images/copy1.gif" width="581" height="31"></td>
<td width="76"><a href="admin.html" onfocus="this.blur()" target="_blank"><img src="images/admin.gif" width="76" height="31" border="0"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
rs.close
dbcon.close
set rs=nothing
set dbcon=nothing
%>
<%end if%>
------------modify_ok.asp---------------------------------------------------------------------
<!-- #include file = "../inc/dbcon.inc" -->
<%
id=request("id")
name=request("name")
email=request("email")
subject=request("subject")
content=request("content")
name=replace(name,"'","''")
subject=replace(subject,"'","''")
content=replace(content,"'","''")
subject=replace(subject,"&","&")
subject=replace(subject,"<","<")
subject=replace(subject,">",">")
content=replace(content,"&","&")
content=replace(content,"<","<")
content=replace(content,">",">")
sql="update board_free set f_name='"&name&"',f_email='"&email&"',f_subject='"&subject&"',f_content='"&content&"' where f_id="&id
db.execute sql
dbcon.close
set dbcon=nothing
%>
<script language="javascript">
<!--
alert("글을 성공적으로 수정하였습니다.")
location.href="index.asp"
-->
</script>
같은 sql 명령을 쿼리분석기에서 직접 입력해보면 실행이 되는데,
뭐가 잘못된건지 알수가 없네요..ㅠ_ㅠ
작성한 게시판의 주소는 http://www.yearning.pe.kr/test/board_free/index.asp 입니다.
답변 부탁드립니다...
댓글 4
-
Foav
2003.02.10 01:07
쿼리가 정상적으로 작동한다면 값이 정상적으로 넘어오는지 확인해보시고 response.write sql 이렇게 해서 어떻게 찍히는지 보시구요^^; -
김소정
2003.02.10 09:26
response.write sql 해서 찍어보면 값들도 다 정상으로 넘어옵니다..ㅠ_ㅠ -
김소정
2003.02.10 09:27
sql 문을 지우고 실행을 시켰더니 오류가 안 나는걸로 보아 sql 문이 잘못된것 같은데, 어디가 잘못된건지 도저히 모르겠네요;; -
BelldandY
2003.05.28 15:55
비밀번호 저장하는 곳에서 공백 이 넘어오지는 않는지 확인해 보세여.. 예를 들면..
char 6 으로 설정된 곳에 4개의 글자만 있으면 뒤의 두칸은 공백이 넘어온답니다.
--; 지금 저도 그거때문에 로그인이 안되서 고치는 중..
--; 고치면 저도 알려주세여~