또다른 수정본.

이부분은 PHPschool 부분에 다른분의 조언을 받아서 고쳐준것인데

검색하면 내용이 전혀 나오질 않습니다.

 

<?
if(!$mode) {
?>
<html>
<head>
<title>우편번호검색</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="../type.css" type="text/css">
<style type="text/css">
<!--        /* 전체 Body, TD 에 폰트 사이즈와 글자체 위치 설정 */                
body, td {font-size:9pt; font-family:굴림; padding:5px 0px 5px 10px;}
-->
</style>
</head>

<body onload="document.zipsearch.dong.focus();">

<form name=zipsearch method="post"   action="zipsearch.php?type=<?echo $type?> &mode=search">
<table align=center>
 <tr>
  <td align=center>
   <b>우펀번호 검색</b>
  </td>
 </tr>
 <tr>
  <td>
   <table align=center height=100>
    <tr>
     <td align=center>현재 거주하고 계시는 읍/면/동/리 명을 입력하세요</td>
    </tr>
     <td align=center>
      <input type=text name=dong size=16 class=input>&nbsp;
      <input type=submit value="검색" align="absmiddle">
     <td>
    </tr>
   </table>
  </td>
 </tr>
</table>
</form>
</body>
</html>

<?
}
 else if($mode == "search")
 {
  if(!$dong)
  {
   echo"<script>history.back();</script>";
     }
?>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="javascript">
alert("<?echo $post1?>" + "-" + "<?echo $addrf?>");
 opener.document.NewRecruit.post1.value = "<?echo $post1?>";
 opener.document.NewRecruit.post2.value = "<?echo $post2?>"; 
 opener.document.NewRecruit.addr.value = "<?echo $select_addrf?>";
 opener.document.NewRecruit.addr.focus();
 self.close();
 </script>

<html>
<head>
<title>우편번호검색</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="../type.css" type="text/css">
<style type="text/css">
<!--        /* 전체 Body, TD 에 폰트 사이즈와 글자체 위치 설정 */                
body, td {font-size:9pt; font-family:굴림; padding:5px 0px 5px 10px;}
-->
</style>
</head>
<?
include "dbconnect.inc";
       
  $result = mysql_query("select CODE, SIDO, GUGUN, DONG, RI, ST_BUNJI, ED_BUNJI from zipcode where DONG like'%$dong%' order by CODE");
  $count = mysql_num_rows($result);
       
?>
<body onload="document.zipsearch2.addr.focus();">

<form name=zipsearch2 method="post" action="zipsearch.php?type=<?echo $type?> &mode=input">
<table align=center>
 <tr>
  <td align=center>
   <b>우편번호 검색</b>
  </td>
 </tr>
 <tr>
  <td>
   <table align=center height=100>
    <tr>
     <td align=center>
      주소를 선택해 주세요
      </td>
     </tr>
     <tr>
      <td align=center>
      <select name='addrf'>
       <?
       if($count == 0)
       {
        echo("검색하고자 하는 주소가 없습니다.");
        echo"<script>history.back();</script>";
       }
       
       while($row = mysql_fetch_object($result))
       {
        $CODE = $row ->CODE;
        $SIDO = $row ->SIDO;
        $GUGUN = $row ->GUGUN;
        $DONG = $row ->DONG;
        $RI = $row ->RI;
        $ST_BUNJI = $row ->ST_BUNJI;
        $ED_BUNJI = $row ->ED_BUNJI;
        
        $CODE = explode("-",$row ->CODE);
        /*
        if($ST_BUNJI)
        {
         $my_addrf = $my_addrf.$ST_BUNJI."~".$ED_BUNJI;
        }*/
        echo"<a href=\"javascript:copy('$CODE[0]','$CODE[1]','$GUGUN $DONG $RI')\">$CODE $SIDO $GUGUN $DONG</a>";
       // echo "<option value='$my_addrf2'>$my_addrf</option>";
       }
       ?>
       </select>
       <input type="submit" value="선택" align="absmiddle">
       </td>
      <tr>
     </table>
    </td>
   </tr>
  </table>
 </td>
</tr>
</table>
</body>
</html>
<?
 }
?>

댓글
  • No Nickname
    No Comment
  • 권한이 없습니다.
    {{m_row.m_nick}}
    -
제목 작성자 날짜
공대여자
mins
야곱
전호현
급한마음에
mins
거치른벌판
거치른벌판
거치른벌판
Mersia
asdas
Test