안녕하세요
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> </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> </td>
<td width="4" rowspan=6> </td>
<td width="1" height="1047" rowspan=6 background="images/index_02.jpg"></td>
</tr>
<tr>
<td colspan=5> </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"> 제품</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"> 신청인</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"> 우편번호</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>
<font color=#666666>(물품수령주소이므로 정확히!)</font></td>
</tr>
<tr>
<td height="42"> 배송주소</td>
<td height="42" colspan="3"><input id=address size=57
name=address></td>
</tr>
<tr>
<td height="38"> 연락처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"> 주문사항</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> </td>
</tr>
<tr>
<td colspan=2> </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> <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> 상품1 : </strong><strong> </strong></td>
<td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"><b> </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> 상품2 : </strong><strong> </strong></td>
<td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"><b> </b><? echo $order_p2; ?><? echo $order_p2_ea; ?>*<? echo $order_p5; ?></td>
</tr>
<tr>
<td width="30%" align="left" bgcolor="ECECEC"><strong> 상품3 : </strong><strong> </strong></td>
<td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"><b> </b><? echo $order_p3; ?><? echo $order_p3_ea; ?>*<? echo $order_p5_ea; ?></td>
</tr>
<tr>
<td width="30%" align="left" bgcolor="ECECEC"><strong> 신청인 : </strong><strong> </strong></td>
<td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"><b> </b><? echo $order_name; ?></td>
</tr>
<tr>
<td width="30%" align="left" bgcolor="ECECEC"><strong> 이메일
: </strong></td>
<td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"> <? echo $order_email; ?> </td>
</tr>
<tr>
<td width="30%" height="30" align="left" bgcolor="ECECEC"><strong> 연락처1 : </strong></td>
<td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"> <? echo "$order_t1-$order_t2-$order_t3"; ?> </td>
</tr>
<tr>
<td width="30%" height="30" align="left" bgcolor="ECECEC"><strong> 연락처2 : </strong></td>
<td width="70%" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"> <? echo "$order_m1-$order_m2-$order_m3"; ?> </td>
</tr>
<tr>
<td width="30%" height="30" align="left" bgcolor="ECECEC"><strong> 상담요청/기타요청사항</strong></td>
<td width="70%" height="30" align="left" bgcolor="<? echo"$Bsell_Bgcolor"; ?>"> <? 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">
<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> |