ITmembers.net 아카이브 · 2002–2009

질문과 답변

게시물 삭제관련

강좌를 보고 부동산 매물정보 라는것을 만들었는데요

게시물을 삭제하는데서 문제가 있네요

좀 봐주시면 감사하겠습니다

글쓰기주소는
http://songnewcityestate.co.kr/php/infowrite.php

여기서부터가 list.php 입니다
http://songnewcityestate.co.kr/php/list.php
=========================


<html>

<head>
<STYLE TYPE=text/css>
BODY,SELECT,input,DIV,form,TEXTAREA,center,option,pre,blockquote {font-family:굴림;font-size:9pt;color:#666666;}
A:link    {color:black;text-decoration:none;}
A:visited {color:black;text-decoration:none;}
A:active  {color:black;text-decoration:none;}
A:hover  {color:black;text-decoration:underline;}
</STYLE>
<meta http-equiv=content-type content=text/html; charset=euc-kr>
<title>주소</title>
<meta name=generator content=Namo WebEditor v5.0>
</head>

<body bgcolor=white text=black link=blue vlink=purple alink=red leftmargin=0 marginwidth=0 topmargin=0 marginheight=0>
<table border=0 cellpadding=0 cellspacing=0 width=700>
    <tr>
        <td width=100 height=30 bgcolor=#cccccc>
            <p align=center><font color=#9C0000><span style=font-size:9pt;><b>주소</b></span></font></p>
        </td>
        <td width=200 height=20 bgcolor=#cccccc>
            <p align=center><font color=#9C0000><span style=font-size:9pt;><b>아파트명</b></span></font></p>
        </td>
        <td width=100 height=20 bgcolor=#cccccc>
            <p align=center><font color=#9C0000><span style=font-size:9pt;><b>평형</b></span></font></p>
        </td>
        <td width=100 height=20 bgcolor=#cccccc>
            <p align=center><font color=#9C0000><span style=font-size:9pt;><b>층수</b></span></font></p>
        </td>
        <td width=200 height=20 bgcolor=#cccccc>
            <p align=center><font color=#9C0000><span style=font-size:9pt;><b>매매가</b></span></font></p>
        </td>
    </tr>
    <tr>
        <td width=700 colspan=5 bgcolor=#ededed>
            <table align=center border=0 cellpadding=0 cellspacing=0 width=700>
                <tr>
<?
$host="localhost";
$user="ziwoogae";
$pass="pass";
$database="database";

$connect=mysql_connect("$host","$user","$pass") or die("DB Connect failed!!!");
$db_conn=mysql_select_db("$database");

$query="SELECT * FROM mm";
$result=mysql_query($query);
while ($array=mysql_fetch_array($result)){
  echo "  
<span style=font-size:9pt;><font color=#666666>                
          <td width=100 height=20>
            <p align=center>$array[juso]</p>
        </td>
        <td width=200 height=20>
            <p align=center>$array[apt]</p>
        </td>
        <td width=100 height=20>
            <p align=center>$array[pyung]</p>
        </td>
        <td width=100 height=20>
            <p align=center>$array[chung]</p>
        </td>
        <td width=200 height=20>
            <p align=center>$array[mae]</p>
        </td>
</font></span>
                </tr>
                <tr>
                    <td width=700 colspan=5 bgcolor=#CCCCCC>
                        <p></p>
                    </td>

                </tr>";
}

mysql_close($connect);
?>
            </table>
        </td>
    </tr>
</table>
</body>
</html>


여기서부터는 modify 입니다 게시물을 삭제하기 위해서

만들었는데 잘 안되네요

===================================


<html>

<head>
<meta http-equiv=content-type content=text/html; charset=euc-kr>
<title>주소</title>
<meta name=generator content=Namo WebEditor v5.0>
</head>

<body bgcolor=white text=black link=blue vlink=purple alink=red leftmargin=0 marginwidth=0 topmargin=0 marginheight=0>
<table border=0 cellpadding=0 cellspacing=0 width=760>
    <tr>
        <td width=100 height=30 bgcolor=#9C0000>
            <p align=center><font color=#CCCCCC><span style=font-size:9pt;><b>주소</b></span></font></p>
        </td>
        <td width=200 height=20 bgcolor=#9C0000>
            <p align=center><font color=#CCCCCC><span style=font-size:9pt;><b>아파트명</b></span></font></p>
        </td>
        <td width=100 height=20 bgcolor=#9C0000>
            <p align=center><font color=#CCCCCC><span style=font-size:9pt;><b>평형</b></span></font></p>
        </td>
        <td width=100 height=20 bgcolor=#9C0000>
            <p align=center><font color=#CCCCCC><span style=font-size:9pt;><b>층수</b></span></font></p>
        </td>
        <td width=100 height=20 bgcolor=#9C0000>
            <p align=center><font color=#CCCCCC><span style=font-size:9pt;><b>매매가</b></span></font></p>
        </td>
        <td width=60 height=20 bgcolor=#9C0000>
            <p align=center><span style=font-size:9pt;><b><font color=#CCCCCC>삭제</font></b></span></p>
        </td>
    </tr>
    <tr>
<?
$host="localhost";
$user="ziwoogae";
$pass="pass";
$database="database";

$connect=mysql_connect("$host","$user","$pass") or die("DB Connect failed!!!");
$db_conn=mysql_select_db("$database");

$query="SELECT * FROM mm";
$result=mysql_query($query);
while ($array=mysql_fetch_array($result)){
  echo "  

        <td width=115 bgcolor=#ededed height=25>
            <p align=center>$array[juso]</p>
        </td>
        <td width=230 bgcolor=#ededed height=25>
            <p align=center>$array[apt]</p>
        </td>
        <td width=115 bgcolor=#ededed height=25>
            <p align=center>$array[pyung]</p>
        </td>
        <td width=115 bgcolor=#ededed height=25>
            <p align=center>$array[chung]</p>
        </td>
        <td width=115 bgcolor=#ededed height=25>
            <p align=center>$array[mae]</p>
        </td>
        <td width=70 bgcolor=#ededed height=25>
            <p align=center><? include"butt.php"; ?></p>
        </td>
    </tr>
    <tr>
        <td width=700 colspan=6 bgcolor=#CCCCCC height=1>
            <p></p>
        </td>
    </tr>";
}

mysql_close($connect);
?>
    
    <tr>
        <td width=700 colspan=6 bgcolor=#ededed>
        </td>
    </tr>
</table>
</body>

</html>

댓글 3