database.sarang.net
UserID
Passwd
Database
DBMS
ㆍMySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
MySQL Q&A 29790 게시물 읽기
No. 29790
mysql 4.x -> 5.x upgrade 문제점좀 도와주새요
작성자
김기범
작성일
2010-09-12 17:29
조회수
7,219

안녕하세요

mysql 4.x 버전에서는 이상없던 php소스가 mysql 5.x 업그레이드후에 자꾸 재대로 작동을 하지 않는데요

너무 벅차네요..어떻게 해야 할지..

일단 한글 깨지는 부분은 수정을 했는데

이상하게도 폼을 넘기는곳에서 값이 넘어가지를 않네요

폼주소는 index.php라는것이고 소스는 아래와같습니다.

 
<?
    include('_connect_site_01.php');
    $DB = new MySQL;
    $DB->DBconnect();

    if(!$_GET[partner]) $_GET[partner] = "root";
    if(!$_GET[spcode]) $_GET[spcode] = "banji";
    $date  = date("Y-m-d");
    $Query = "SELECT date FROM partner_count WHERE partner='$_GET[partner]' AND date='$date'";
    $DB->ExecSql($Query); $row = $DB->Fetch();

    if($row[date] == NULL)
    {
        $Insert = "INSERT INTO partner_count (id,partner, date, hit) VALUES('','$_GET[partner]','$date','1')";
        $DB->ExecSql($Insert);
    }
    else
    {
        $Update = "UPDATE partner_count SET hit= hit+1 WHERE partner='$_GET[partner]'";
        $DB->ExecSql($Update);
    }
?>
<HTML>
<HEAD>
<TITLE>:: 상품정보  ::</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=euc-kr">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { /v2.0
  window.open(theURL,winName,features);
}
/-->
</script>

<script language=JavaScript>

function OpenZipcode()
{
window.open("zipcode/zipcode.php?form=morningform&zip1=zip1&zip2=zip2&address=address","zipwin","width=508,height=167,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
}

</script>

<script language="JavaScript" type="text/JavaScript">
<!--

    function memberc(f) {
        if( (f.order_id.value.length<4) || (f.order_id.value.search(/([^A-Za-z0-9]+)/)!=-1) )
        {
            alert("회원아이디를 바르게 입력해 주십시오."); f.order_id.focus(); return false;
        }
        else
        {
            window.open('memberc.php?fm_id='+f.order_id.value, '회원확인', 'scrollbars=no,resizable=no,history=no,left='+(screen.width-710)+',top=0,width=430,height=280');
        }
    }

function orderCheck(f) {
        if(!f.order_name.value)
         { window.alert('이름을 입력하세요'); f.order_name.focus(); return false; }
        if(!f.order_email.value)
         { window.alert('메일주소를 입력하세요'); f.order_email.focus(); return false; }
        if(!f.zip1.value)
         { window.alert('주소를 입력하세요'); f.zip1.focus(); return false; }
        if(!f.order_t1.value)
         { window.alert('연락처 1를 입력하세요'); f.order_t1.focus(); return false; }
        if(!f.order_t2.value)
         { window.alert('연락처 1를 입력하세요'); f.order_t2.focus(); return false; }
        if(!f.order_t3.value)
         { window.alert('연락처 1를 입력하세요'); f.order_t3.focus(); return false; }
        if(!f.order_m1.value)
         { window.alert('연락처 2를 입력하세요'); f.order_m1.focus(); return false; }
        if(!f.order_m2.value)
         { window.alert('연락처 2를 입력하세요'); f.order_m2.focus(); return false; }
        if(!f.order_m3.value)
         { window.alert('연락처 3를 입력하세요'); f.order_m3.focus(); return false; }
        
        return true;
    }
/-->
</script>

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>

<link href="form.css" rel="stylesheet" type="text/css">
<link href="form_img/form_a1/form.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
  <form method="post" name="morningform" action="./form_order/s_order_check.php" onSubmit="return orderCheck(this);">
    <!-- 파드너의 아이디와 상품이름을 꼭 입력해주세요 --------------->
   <input type='hidden' name='partner' value='<?=$_GET[partner]; ?>'>
    <input type='hidden' name='spcode'  value='<?=$_GET[spcode]; ?>'>
    <input type='hidden' name='title'  value='<?=$_GET[title]; ?>'>
    <!--------------------------------------------------------------->
<!-- ImageReady Slices (main.psd) -->
<table width=1003 border=0 cellpadding=0 cellspacing=0>
  <tr>
    <td colspan=10>&nbsp;</td>
  </tr>
  <tr>
    <td width="1" rowspan=6><img src="http://i103.photobucket.com/albums/m159/robsin/vi/index_02.jpg" width=1 height=1047 alt=""></td>
    
    <td colspan=5>&nbsp;</td>
    <td width="4" rowspan=6>&nbsp;</td>
    <td width="1" height="1047" rowspan=6 background="images/index_02.jpg"></td>
  </tr>
  <tr>
    <td colspan=5>&nbsp;</td>
  </tr>
 
  <tr>
    <td><img src="http://i103.photobucket.com/albums/m159/robsin/vi/index_11.jpg" width=9 height=319 alt=""></td>
    <td height="319" colspan=2 valign="top" background="images/index_12.jpg"><table width="634" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="84" height="27">&nbsp;&nbsp;제품</td>
        <td><select name=order_p1>
          <option value="" selected> -선택-</option>
          <option value="반지:250,00원 ">반지:250,00원</option>
 
        </select></td>
        <td colspan="2"><select name=order_p1_ea>
          <option value=선택 selected>수량</option>
          <option
                          value=01개>01</option>
          <option value=02개>02</option>
          <option value=03개>03</option>
          <option
                          value=04개>04</option>
          <option value=05개>05</option>
          <option value=06개>06</option>
          <option
                          value=07개>07</option>
          <option value=08개>08</option>
          <option value=09개>09</option>
          <option
                          value=10개>10</option>
        </select></td>
      </tr>
      <tr>
        <td height="31">&nbsp;&nbsp;신청인</td>
        <td width="230" height="31"><input maxlength=10
                        size=12 name=order_name></td>
        <td width="87"><div align="center">메일주소</div></td>
        <td width="233"><input maxlength=30
                        size=30 name=order_email></td>
      </tr>
      <tr>
        <td height="37">&nbsp;&nbsp;우편번호</td>
        <td height="37" colspan="3"><input class=text
                        maxlength=3 size=6 name=zip1>
          -
          <input class=text
                        maxlength=3 size=6 name=zip2>
              <input class=button onClick="javascript: OpenZipcode()" type=button value=우편번호찾기 name=button2>
          &nbsp; <font color=#666666>(물품수령주소이므로 정확히!)</font></td>
      </tr>
      <tr>
        <td height="42">&nbsp;&nbsp;배송주소</td>
        <td height="42" colspan="3"><input id=address size=57
                    name=address></td>
      </tr>
      <tr>
        <td height="38">&nbsp;&nbsp;연락처1</td>
        <td height="38"><input maxlength=4
                        size=5 name=order_t1>
          -
          <input maxlength=4 size=5
                        name=order_t2>
          -
          <input maxlength=4 size=5
                        name=order_t3></td>
        <td height="38"><div align="center">연락처2</div></td>
        <td height="38"><input maxlength=4 size=5
                        name=order_m1>
          -
          <input maxlength=4 size=5
                        name=order_m2>
          -
          <input maxlength=4 size=5
                        name=order_m3></td>
      </tr>
      <tr>
        <td height="58">&nbsp;&nbsp;주문사항</td>
        <td height="58" colspan="3"><textarea id=order_etc name=order_etc rows=3 cols=55></textarea></td>
      </tr>
    </table></td>
    <td width="51"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/index_14.jpg" width=17 height=319 alt=""></td>
  </tr>
  <tr>
    <td colspan=4 rowspan=2><div align="center">
      <input type=image width=211 height=69 src="images/index_16.jpg" vspace=0 border=0 name=image2>
    </div></td>
    <td colspan=2>&nbsp;</td>
  </tr>
  <tr>
    <td colspan=2>&nbsp;</td>
  </tr>
  <tr>
    <td><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=1 height=1 alt=""></td>
    <td width="128"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=57 height=1 alt=""></td>
    <td width="513"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=225 height=1 alt=""></td>
    <td width="51"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=9 height=1 alt=""></td>
    <td width="1"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=1 height=1 alt=""></td>
    <td width="426"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=426 height=1 alt=""></td>
    <td width="194"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=194 height=1 alt=""></td>
    <td width="17"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=17 height=1 alt=""></td>
    <td width="31"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=31 height=1 alt=""></td>
    <td width="42"><img src="http://i103.photobucket.com/albums/m159/robsin/vi/spacer.gif" width=42 height=1 alt=""></td>
  </tr>
</table>
<!-- End ImageReady Slices -->
</BODY>
</form>
</HTML>

 

위 소스가 폼을 넘기는 소스인데 여기서 mysql4.x에서는 이상이 없는데

5.x 버전에서는 폼을 넘기면 폼을 넘겨받은 페이지에서 아무것도 값이  나오지 않거든요..

아래는 order_check.php라는 폼을 넘겨 받는곳의 소스고요

아무래도 넘기는 index.php소스에서 먼가 수정을 mysql 5.x버전에 맞게 수정을 해야 하는거 같은데

도통 감을 못잡겠습니다.

도움좀 꼭 부탁드립니다.

 

<? include "config.php"; ?>
<? include "top.html"; ?><title>:: 주문신청 내역 - 확인 ::</title>
<body>
<div align="center"></div>
<table width="635" border="0" align="center" cellpadding="0">
  <tr>
    <td width="100%" valign="top"> <form method=post action="s_sendmail.php">
        <div align=center>
          <table border=0 width="635" bgcolor="<? echo"$Table_Bgcolor"; ?>" cellspacing="1" cellpadding="3">
            <tr>
              <td colspan="2" align="center" bgcolor="<? echo"$Asell_Bgcolor"; ?>">
                <p align=center>&nbsp;<b><font size=3>입력하신 내용이 맞으면 <font color="red">OK</font>
                  버튼을 클릭하세요 </font></b>-</td>
            </tr>
            <?
// EMAIL 존재 여부 체크 찾으면 0
function email_check($email)
{
  if (eregi("([a-z0-9\_\-\.]+)@([a-z0-9\_\-\.]+)", $email)) {
  return 0;
  }
  return 1;
}

// 모든 에러 처리
function error($Mes, $Url= 0) {
    if(!$Url) {
        echo "
        <script language=javascript>
        alert('$Mes');
        history.go(-1);
        </script>";
    }
    else {
        echo "
        <script language=javascript>
        alert('$Mes');
        </script>
        <meta http-equiv='Refresh' content='0; URL=$Url'>";
    }

exit;
}



while(list($key,$value) = each($_POST))
{
?>
            <input type="hidden" name="<? echo"$key"; ?>" value="<? echo "$value"; ?>">
            <?
}
?>
            <tr>
              <td width="30%" align="left" bgcolor="ECECEC"><strong>&nbsp; 상품1&nbsp;:&nbsp;</strong><strong>&nbsp;</strong></td>
              <td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"><b>&nbsp;</b><? echo $order_p1; ?><? echo $order_p1_ea; ?>*<? echo $order_p4; ?><? echo $order_p4_ea; ?></td>
            </tr>
            <tr>
              <td width="30%" align="left" bgcolor="ECECEC"><strong>&nbsp; 상품2&nbsp;:&nbsp;</strong><strong>&nbsp;</strong></td>
              <td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"><b>&nbsp;</b><? echo $order_p2; ?><? echo $order_p2_ea; ?>*<? echo $order_p5; ?></td>
            </tr>
            <tr>
              <td width="30%" align="left" bgcolor="ECECEC"><strong>&nbsp; 상품3&nbsp;:&nbsp;</strong><strong>&nbsp;</strong></td>
              <td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"><b>&nbsp;</b><? echo $order_p3; ?><? echo $order_p3_ea; ?>*<? echo $order_p5_ea; ?></td>
            </tr>
            <tr>
              <td width="30%" align="left" bgcolor="ECECEC"><strong>&nbsp; 신청인&nbsp;:&nbsp;</strong><strong>&nbsp;</strong></td>
              <td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"><b>&nbsp;</b><? echo $order_name; ?></td>
            </tr>
            <tr>
              <td width="30%" align="left" bgcolor="ECECEC"><strong>&nbsp;&nbsp;이메일
                :&nbsp;</strong></td>
              <td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>">&nbsp;<? echo $order_email; ?>&nbsp;</td>
            </tr>
            <tr>
              <td width="30%" height="30" align="left" bgcolor="ECECEC"><strong>&nbsp;&nbsp;연락처1&nbsp;:&nbsp;</strong></td>
              <td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>">&nbsp;<? echo "$order_t1-$order_t2-$order_t3"; ?>&nbsp;</td>
            </tr>
            <tr>
              <td width="30%" height="30" align="left" bgcolor="ECECEC"><strong>&nbsp;&nbsp;연락처2&nbsp;:&nbsp;</strong></td>
              <td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>">&nbsp;<? echo "$order_m1-$order_m2-$order_m3"; ?>&nbsp;</td>
            </tr>
            <tr>
              <td width="30%" height="30" align="left" bgcolor="ECECEC"><strong>&nbsp;&nbsp;상담요청/기타요청사항</strong></td>
              <td width="70%" height="30" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>">&nbsp;<? echo $order_etc; ?><? echo $qna_solution; ?></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" bgcolor="<? echo"$Asell_Bgcolor"; ?>">
                <input type="submit" value=" OK " style="CURSOR: hand"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="button" value=" 취소 " style="CURSOR: hand" onClick=javascript:history.back()>              </td>
            </tr>
            <tr>
              <td colspan="2" align="center" bgcolor="<? echo"$Asell_Bgcolor"; ?>">              </td>
            </tr>
          </table>
        </div>
      </form></td>
  </tr>
</table>
<div align="center"> </div>
<div align="center">
  <? include "bottom.html"; ?>
</div>

이 글에 대한 댓글이 총 1건 있습니다.

mysql 문제가 아니고 PHP 문제인듯 합니다.
PHP를 4.x 에서 5.x로 올라간거라면...
함수들을 확인해 보세요..
5.x로 넘어오면서 바뀐게 좀 있습니다....

아니면 4.x 의 PHP 소스를 100% 그대로 사용하고 싶으시면
php.ini를 수정해 주셔야 합니다..
그다지 추천하지는 않습니다...
 

박상렬님이 2010-09-27 15:27에 작성한 댓글입니다. Edit
[Top]
No.
제목
작성자
작성일
조회
29793쿼리문 좀 도와 주세요 [1]
강삼수
2010-09-15
7582
29792select 문 쿼리 최적화에 대해서 [1]
정현철
2010-09-14
7210
29791[초보] 시리얼통신 값을 mysql과 mfc로 연동 하여 DB로 저장하는데 문제가.. [1]
김학순
2010-09-14
9293
29790mysql 4.x -> 5.x upgrade 문제점좀 도와주새요 [1]
김기범
2010-09-12
7219
29789저장프로시져 실행중 발생한 sql 에러코드와 sql 오류메시지 알아내는 방법이..? [1]
알고파
2010-09-09
12974
29788sql 쿼리 좀 알려주세요.. [1]
ㅎㅎ
2010-09-09
7027
29787InnoDB ibdata [1]
나방
2010-09-08
9564
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.019초, 이곳 서비스는
	PostgreSQL v16.4로 자료를 관리합니다