PHP 글 내용보기 / 수정하기
페이지 정보
본문
2017-11-13 03:20
. php 4 관련 mysql 쿼리를 PHP 5와 7에 작동하도록 변경
. mysql_connect, mysql_select_db, mysql_query 를 mysqli_connect, mysqli_select_db, mysqli_query 으로 변경
2020-02-08 20:55
. style 분리
. 디비 필드 등을 상단에서 설정으로 하부 내용에 영향이 없도록 변경
1. 스타일문서 : 문서_style.css
#app_frm { }
.app_title { font-size:1.2em; font-weight:bold; padding:10px 0 15px 0; }
#app_frm th { padding-left:10px; }
#hp_table { }
#hp_table img { border:0; }
#hp_table a:link, a:visited {color:#000; text-decoration:none; }
#hp_table a:hover, a:focus, a:active {color:#000; text-decoration:none; }
#hp_table table { background-color:#e5e5e4; border-top:solid #bf82bb 1px; border-bottom:solid #c1c1c1 1px; }
#hp_table th { padding:7px 10px; text-align:center; font-weight:bold; letter-spacing:-1; background:#f5f5f4; color:#292929; }
#hp_table td { padding:5px 0; background:#ffffff; color:#797979; line-height:20px; }
#hp_table .hp_center { text-align:center; }
#hp_table .hp_left { text-align:left; }
#hp_table .hp_right { text-align:right; }
*, :after, :before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
input[type=text],input[type=password], textarea {
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
outline: none;
}
input[type=text]:focus,input[type=password]:focus, textarea:focus,select:focus {
-webkit-box-shadow: 0 0 5px #9ed4ff;
-moz-box-shadow: 0 0 5px #9ed4ff;
box-shadow: 0 0 5px #9ed4ff;
border: 1px solid #558ab7 !important;
}
.hp_input {height:35px;}
.hp_list_total {
float: left;
line-height: 30px;
font-size: 0.92em;
color:
#4e546f;
background:
#d4d4d4;
padding: 0 10px;
border-radius: 5px;
}
a.hp_btn,.hp_btn{line-height:35px;height:35px;padding:0 10px;text-align:center;font-weight:bold;border:0;
-webkit-transition: background-color 0.3s ease-out;
-moz-transition: background-color 0.3s ease-out;
-o-transition: background-color 0.3s ease-out;
transition: background-color 0.3s ease-out;}
a.hp_btn_b01,.hp_btn_b01 {display:inline-block;background:#4c4f6f;color:#fff;text-decoration:none;vertical-align:middle}
.hp_btn_b01:hover, .hp_btn_b01:hover {background:#54598c}
a.hp_btn_b02,.hp_btn_b02 {display:inline-block;background:#253dbe;padding:0 10px;color:#fff;text-decoration:none;border:0;vertical-align:middle;}
a.hp_btn_b02:hover, .hp_btn_b02:hover {background:#0025eb}
a.hp_btn_b03, .hp_btn_b03 {display:inline-block;background:#fff;border:1px solid #b9bdd3;color:#646982;text-decoration:none;vertical-align:middle}
a.hp_btn_b03:hover, .hp_btn_b03:hover {background:#ebedf6}
a.hp_btn_b04, .hp_btn_b04 {display:inline-block;background:#fff;border:1px solid #ccc;color:#707070;text-decoration:none;vertical-align:middle}
a.hp_btn_b04:hover, .hp_btn_b04:hover {color:#333;background:#f9f9f9}
a.hp_btn_admin,.hp_btn_admin {display:inline-block;background:#d13f4a;color:#fff;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */
.hp_btn_admin:hover, a.hp_btn_admin:hover {background:#ff3746}
.hp_btn_submit {border:0;background:#253dbe;color:#fff;cursor:pointer;border:0}
.hp_btn_submit:hover {background:#0025eb}
button.hp_btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none}
2. 내용보기 : 문서_view.php
<?php
$mysql_host = "localhost";
$mysql_user = "디비 아이디";
$mysql_password = "디비 비밀번호";
$mysql_db = "데이타베이스";
$dbconn = mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_db);
// 그누보드5 사용시
//include_once "_common.php"; // 그누보드 common.php 경로
//$dbconn = mysqli_connect(G5_MYSQL_HOST,G5_MYSQL_USER,G5_MYSQL_PASSWORD,G5_MYSQL_DB) ;
if (!$dbconn) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
$file_name = "문서"; // ex: 목록 파일명 / 문서_list.php 일때는 문서 를 입력
$file_exec = ".php"; // ex: .php
$DB_table = "DB테이블";
$orderidx = "num"; // DB 테이블 고유번호
$idx = $_GET['idx'];
$page_num = $_GET['page_num'];
$SearchPart = $_GET['SearchPart'];
$SearchStr = $_GET['SearchStr'];
//echo "SearchPart = {$SearchPart}<br>";
//echo "SearchStr = {$SearchStr}<br>";
$SearchData = "&SearchPart={$SearchPart}&SearchStr={$SearchStr}"; // 페이징에 노출된 검색조건들
$sql = "select * from {$DB_table} where {$orderidx}='{$idx}' ";
$qry = mysqli_query($dbconn,$sql);
if (!$qry) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysqli_fetch_array($qry);
// 참고자료: https://www.happyjung.com/lecture/1132
$isset_check = $row['name']; // 필드 데이타 하나를 호출합니다.
//echo $row['name']; // 정상보이는지 확인
?>
<link rel="stylesheet" href="<?php echo $file_name; ?>_style.css">
<div id="hp_table">
<?php
if(isset($isset_check)) { // 자료 있을때
?>
<table width="100%" class="hp_table">
<tr>
<th>이름</th>
<td style="text-align:left;"><?php echo $row['name']; ?>
</tr>
<tr>
<th>E-mail</th>
<td style="text-align:left;"><?php echo $row['email']; ?></td>
</tr>
</table>
<?php } else { // 자료 없을때 ?>
내용이 없습니다.
<?php } ?>
</div>
<div style="width:100%; text-align:center; padding-top:20px;">
<a href="<?php echo "{$file_name}_list{$file_exec}?page_num={$page_num}{$SearchData}"; ?>" class="hp_btn hp_btn_b02">목록보기</a>
</div>
<?php
echo mysqli_error($dbconn);
// close connection
mysqli_close($dbconn);
?>
3. 내용 수정 : 문서_edit.php
<?php
$mysql_host = "localhost";
$mysql_user = "디비 아이디";
$mysql_password = "디비 비밀번호";
$mysql_db = "데이타베이스";
$dbconn = mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_db);
// 그누보드5 사용시
//include_once "_common.php"; // 그누보드 common.php 경로
//$dbconn = mysqli_connect(G5_MYSQL_HOST,G5_MYSQL_USER,G5_MYSQL_PASSWORD,G5_MYSQL_DB) ;
if (!$dbconn) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
$file_name = "문서"; // ex: 목록 파일명 / 문서_list.php 일때는 문서 를 입력
$file_exec = ".php"; // ex: .php
$DB_table = "DB테이블";
$orderidx = "num"; // DB 테이블 고유번호
$idx = $_GET['idx'];
$page_num = $_GET['page_num'];
$SearchPart = $_GET['SearchPart'];
$SearchStr = $_GET['SearchStr'];
//echo "SearchPart = {$SearchPart}<br>";
//echo "SearchStr = {$SearchStr}<br>";
$SearchData = "&SearchPart={$SearchPart}&SearchStr={$SearchStr}"; // 페이징에 노출된 검색조건들
$sql = "select * from {$DB_table} where {$orderidx}='{$idx}' ";
$qry = mysqli_query($dbconn,$sql);
if (!$qry) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysqli_fetch_array($qry);
// 참고자료: https://www.happyjung.com/lecture/1132
$isset_check = $row['name']; // 필드 데이타 하나를 호출합니다.
//echo $row['name']; // 정상보이는지 확인
?>
<link rel="stylesheet" href="<?php echo $file_name; ?>_style.css">
<div id="hp_table">
<?php
if(isset($isset_check)) { // 자료 있을때
?>
<form action="<?php echo $file_name; ?>_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="idx" value="<?php echo $row['idx']; ?>">
<input type="hidden" name="SearchPart" value="<?php echo $SearchPart; ?>">
<input type="hidden" name="SearchStr" value="<?php echo $SearchStr; ?>">
<input type="hidden" name="page_num" value="<?php echo $page_num; ?>">
<input type="hidden" name="w" value="u">
<table width="100%" class="hp_table">
<tr>
<th>이름</th>
<td style="text-align:left;"><input type="text" name="name" value="<?php echo $row['name']; ?>" class="hp_input"></td>
</tr>
<tr>
<th>E-mail</th>
<td style="text-align:left;"><input type="text" name="email" value="<?php echo $row['email']; ?>" class="hp_input"></td>
</tr>
</table>
<div style="width:100%; text-align:center; padding-top:20px;">
<input type="submit" value=" 전송하기 " class="btn_submit btn">
</div>
<?php } else { // 자료 없을때 ?>
내용이 없습니다.
<?php } ?>
</form>
</div>
<div style="width:100%; padding:15px 0px 0px 20px;">
<div style="float:left;"><a href="<?php echo "{$file_name}{$file_exec}?page_num={$page_num}{$SearchData}"; ?>">목록보기</a></div>
<div style="clear:both;"></div>
</div>
<?php
echo mysqli_error($dbconn);
// close connection
mysqli_close($dbconn);
?>
4. 저장하기 : 문서명_update.php
<?php
// php.ini 의 register_globals=off 일 경우 (php >= 4.1.0)
//@extract($_GET);
//@extract($_POST);
//@extract($_SERVER);
$mysql_host = "localhost";
$mysql_user = "디비 아이디";
$mysql_password = "디비 비밀번호";
$mysql_db = "데이타베이스";
$file_name = "문서"; // ex: 목록 파일명 / 문서_list.php 일때는 문서 를 입력
$file_exec = ".php"; // ex: .php
$DB_table = G5_TABLE_PREFIX."application";
$orderidx = "num"; // DB 테이블 고유번호
$REQUEST_URI = $_POST['REQUEST_URI'];
$w = $_POST['w'];
$idx = $_POST['idx'];
$page_num = $_POST['page_num'];
$SearchPart = $_POST['SearchPart'];
$SearchStr = $_POST['SearchStr'];
$name = $_POST['name'];
$email = $_POST['email'];
$dbconn = mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_db);
if (!$dbconn) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
if ($w=='u' && $name) {
$sql = "update {$DB_table} set ";
$sql .= " name='{$name}' ";
$sql .= ", email='{$email}' ";
$sql .= " where {$orderidx}='{$idx}' ";
$qry = mysqli_query($dbconn,$sql);
if (!$qry) {
echo 'Could not run query: ' . mysqli_error($dbconn);
exit;
}
//echo mysqli_error($dbconn);
}
// close connection
mysqli_close($dbconn);
/*
// 업데이트 파일에서 지정한 페이지로 보낼때
echo " <script>alert('저장되었습니다.'); document.location.href='{$REQUEST_URI}'; </script>";
// 목록으로 보낼때
echo " <script>alert('저장되었습니다.'); document.location.href='{$file_name}_list{$file_exec}'; </script>";
*/
// 상세페이지 보낼때
echo " <script>alert('저장되었습니다.'); document.location.href='{$file_name}_view{$file_exec}?idx={$idx}'; </script>";
?>
?>
. php 4 관련 mysql 쿼리를 PHP 5와 7에 작동하도록 변경
. mysql_connect, mysql_select_db, mysql_query 를 mysqli_connect, mysqli_select_db, mysqli_query 으로 변경
2020-02-08 20:55
. style 분리
. 디비 필드 등을 상단에서 설정으로 하부 내용에 영향이 없도록 변경
1. 스타일문서 : 문서_style.css
#app_frm { }
.app_title { font-size:1.2em; font-weight:bold; padding:10px 0 15px 0; }
#app_frm th { padding-left:10px; }
#hp_table { }
#hp_table img { border:0; }
#hp_table a:link, a:visited {color:#000; text-decoration:none; }
#hp_table a:hover, a:focus, a:active {color:#000; text-decoration:none; }
#hp_table table { background-color:#e5e5e4; border-top:solid #bf82bb 1px; border-bottom:solid #c1c1c1 1px; }
#hp_table th { padding:7px 10px; text-align:center; font-weight:bold; letter-spacing:-1; background:#f5f5f4; color:#292929; }
#hp_table td { padding:5px 0; background:#ffffff; color:#797979; line-height:20px; }
#hp_table .hp_center { text-align:center; }
#hp_table .hp_left { text-align:left; }
#hp_table .hp_right { text-align:right; }
*, :after, :before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
input[type=text],input[type=password], textarea {
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
outline: none;
}
input[type=text]:focus,input[type=password]:focus, textarea:focus,select:focus {
-webkit-box-shadow: 0 0 5px #9ed4ff;
-moz-box-shadow: 0 0 5px #9ed4ff;
box-shadow: 0 0 5px #9ed4ff;
border: 1px solid #558ab7 !important;
}
.hp_input {height:35px;}
.hp_list_total {
float: left;
line-height: 30px;
font-size: 0.92em;
color:
#4e546f;
background:
#d4d4d4;
padding: 0 10px;
border-radius: 5px;
}
a.hp_btn,.hp_btn{line-height:35px;height:35px;padding:0 10px;text-align:center;font-weight:bold;border:0;
-webkit-transition: background-color 0.3s ease-out;
-moz-transition: background-color 0.3s ease-out;
-o-transition: background-color 0.3s ease-out;
transition: background-color 0.3s ease-out;}
a.hp_btn_b01,.hp_btn_b01 {display:inline-block;background:#4c4f6f;color:#fff;text-decoration:none;vertical-align:middle}
.hp_btn_b01:hover, .hp_btn_b01:hover {background:#54598c}
a.hp_btn_b02,.hp_btn_b02 {display:inline-block;background:#253dbe;padding:0 10px;color:#fff;text-decoration:none;border:0;vertical-align:middle;}
a.hp_btn_b02:hover, .hp_btn_b02:hover {background:#0025eb}
a.hp_btn_b03, .hp_btn_b03 {display:inline-block;background:#fff;border:1px solid #b9bdd3;color:#646982;text-decoration:none;vertical-align:middle}
a.hp_btn_b03:hover, .hp_btn_b03:hover {background:#ebedf6}
a.hp_btn_b04, .hp_btn_b04 {display:inline-block;background:#fff;border:1px solid #ccc;color:#707070;text-decoration:none;vertical-align:middle}
a.hp_btn_b04:hover, .hp_btn_b04:hover {color:#333;background:#f9f9f9}
a.hp_btn_admin,.hp_btn_admin {display:inline-block;background:#d13f4a;color:#fff;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */
.hp_btn_admin:hover, a.hp_btn_admin:hover {background:#ff3746}
.hp_btn_submit {border:0;background:#253dbe;color:#fff;cursor:pointer;border:0}
.hp_btn_submit:hover {background:#0025eb}
button.hp_btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none}
2. 내용보기 : 문서_view.php
<?php
$mysql_host = "localhost";
$mysql_user = "디비 아이디";
$mysql_password = "디비 비밀번호";
$mysql_db = "데이타베이스";
$dbconn = mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_db);
// 그누보드5 사용시
//include_once "_common.php"; // 그누보드 common.php 경로
//$dbconn = mysqli_connect(G5_MYSQL_HOST,G5_MYSQL_USER,G5_MYSQL_PASSWORD,G5_MYSQL_DB) ;
if (!$dbconn) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
$file_name = "문서"; // ex: 목록 파일명 / 문서_list.php 일때는 문서 를 입력
$file_exec = ".php"; // ex: .php
$DB_table = "DB테이블";
$orderidx = "num"; // DB 테이블 고유번호
$idx = $_GET['idx'];
$page_num = $_GET['page_num'];
$SearchPart = $_GET['SearchPart'];
$SearchStr = $_GET['SearchStr'];
//echo "SearchPart = {$SearchPart}<br>";
//echo "SearchStr = {$SearchStr}<br>";
$SearchData = "&SearchPart={$SearchPart}&SearchStr={$SearchStr}"; // 페이징에 노출된 검색조건들
$sql = "select * from {$DB_table} where {$orderidx}='{$idx}' ";
$qry = mysqli_query($dbconn,$sql);
if (!$qry) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysqli_fetch_array($qry);
// 참고자료: https://www.happyjung.com/lecture/1132
$isset_check = $row['name']; // 필드 데이타 하나를 호출합니다.
//echo $row['name']; // 정상보이는지 확인
?>
<link rel="stylesheet" href="<?php echo $file_name; ?>_style.css">
<div id="hp_table">
<?php
if(isset($isset_check)) { // 자료 있을때
?>
<table width="100%" class="hp_table">
<tr>
<th>이름</th>
<td style="text-align:left;"><?php echo $row['name']; ?>
</tr>
<tr>
<th>E-mail</th>
<td style="text-align:left;"><?php echo $row['email']; ?></td>
</tr>
</table>
<?php } else { // 자료 없을때 ?>
내용이 없습니다.
<?php } ?>
</div>
<div style="width:100%; text-align:center; padding-top:20px;">
<a href="<?php echo "{$file_name}_list{$file_exec}?page_num={$page_num}{$SearchData}"; ?>" class="hp_btn hp_btn_b02">목록보기</a>
</div>
<?php
echo mysqli_error($dbconn);
// close connection
mysqli_close($dbconn);
?>
3. 내용 수정 : 문서_edit.php
<?php
$mysql_host = "localhost";
$mysql_user = "디비 아이디";
$mysql_password = "디비 비밀번호";
$mysql_db = "데이타베이스";
$dbconn = mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_db);
// 그누보드5 사용시
//include_once "_common.php"; // 그누보드 common.php 경로
//$dbconn = mysqli_connect(G5_MYSQL_HOST,G5_MYSQL_USER,G5_MYSQL_PASSWORD,G5_MYSQL_DB) ;
if (!$dbconn) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
$file_name = "문서"; // ex: 목록 파일명 / 문서_list.php 일때는 문서 를 입력
$file_exec = ".php"; // ex: .php
$DB_table = "DB테이블";
$orderidx = "num"; // DB 테이블 고유번호
$idx = $_GET['idx'];
$page_num = $_GET['page_num'];
$SearchPart = $_GET['SearchPart'];
$SearchStr = $_GET['SearchStr'];
//echo "SearchPart = {$SearchPart}<br>";
//echo "SearchStr = {$SearchStr}<br>";
$SearchData = "&SearchPart={$SearchPart}&SearchStr={$SearchStr}"; // 페이징에 노출된 검색조건들
$sql = "select * from {$DB_table} where {$orderidx}='{$idx}' ";
$qry = mysqli_query($dbconn,$sql);
if (!$qry) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysqli_fetch_array($qry);
// 참고자료: https://www.happyjung.com/lecture/1132
$isset_check = $row['name']; // 필드 데이타 하나를 호출합니다.
//echo $row['name']; // 정상보이는지 확인
?>
<link rel="stylesheet" href="<?php echo $file_name; ?>_style.css">
<div id="hp_table">
<?php
if(isset($isset_check)) { // 자료 있을때
?>
<form action="<?php echo $file_name; ?>_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="idx" value="<?php echo $row['idx']; ?>">
<input type="hidden" name="SearchPart" value="<?php echo $SearchPart; ?>">
<input type="hidden" name="SearchStr" value="<?php echo $SearchStr; ?>">
<input type="hidden" name="page_num" value="<?php echo $page_num; ?>">
<input type="hidden" name="w" value="u">
<table width="100%" class="hp_table">
<tr>
<th>이름</th>
<td style="text-align:left;"><input type="text" name="name" value="<?php echo $row['name']; ?>" class="hp_input"></td>
</tr>
<tr>
<th>E-mail</th>
<td style="text-align:left;"><input type="text" name="email" value="<?php echo $row['email']; ?>" class="hp_input"></td>
</tr>
</table>
<div style="width:100%; text-align:center; padding-top:20px;">
<input type="submit" value=" 전송하기 " class="btn_submit btn">
</div>
<?php } else { // 자료 없을때 ?>
내용이 없습니다.
<?php } ?>
</form>
</div>
<div style="width:100%; padding:15px 0px 0px 20px;">
<div style="float:left;"><a href="<?php echo "{$file_name}{$file_exec}?page_num={$page_num}{$SearchData}"; ?>">목록보기</a></div>
<div style="clear:both;"></div>
</div>
<?php
echo mysqli_error($dbconn);
// close connection
mysqli_close($dbconn);
?>
4. 저장하기 : 문서명_update.php
<?php
// php.ini 의 register_globals=off 일 경우 (php >= 4.1.0)
//@extract($_GET);
//@extract($_POST);
//@extract($_SERVER);
$mysql_host = "localhost";
$mysql_user = "디비 아이디";
$mysql_password = "디비 비밀번호";
$mysql_db = "데이타베이스";
$file_name = "문서"; // ex: 목록 파일명 / 문서_list.php 일때는 문서 를 입력
$file_exec = ".php"; // ex: .php
$DB_table = G5_TABLE_PREFIX."application";
$orderidx = "num"; // DB 테이블 고유번호
$REQUEST_URI = $_POST['REQUEST_URI'];
$w = $_POST['w'];
$idx = $_POST['idx'];
$page_num = $_POST['page_num'];
$SearchPart = $_POST['SearchPart'];
$SearchStr = $_POST['SearchStr'];
$name = $_POST['name'];
$email = $_POST['email'];
$dbconn = mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_db);
if (!$dbconn) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
if ($w=='u' && $name) {
$sql = "update {$DB_table} set ";
$sql .= " name='{$name}' ";
$sql .= ", email='{$email}' ";
$sql .= " where {$orderidx}='{$idx}' ";
$qry = mysqli_query($dbconn,$sql);
if (!$qry) {
echo 'Could not run query: ' . mysqli_error($dbconn);
exit;
}
//echo mysqli_error($dbconn);
}
// close connection
mysqli_close($dbconn);
/*
// 업데이트 파일에서 지정한 페이지로 보낼때
echo " <script>alert('저장되었습니다.'); document.location.href='{$REQUEST_URI}'; </script>";
// 목록으로 보낼때
echo " <script>alert('저장되었습니다.'); document.location.href='{$file_name}_list{$file_exec}'; </script>";
*/
// 상세페이지 보낼때
echo " <script>alert('저장되었습니다.'); document.location.href='{$file_name}_view{$file_exec}?idx={$idx}'; </script>";
?>
?>
댓글목록
등록된 댓글이 없습니다.