sql 문의드립니다.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
sql 문의드립니다.

QA

sql 문의드립니다.

답변 1

본문

view 스킨에서 내용 수정을 하기위해 아래와 같이 데이터를 넣는데 숫자만 있을땐 되는데 문자열은 적용이 안되는데 수정이 필요한지요? 도움 부탁드립니다.

 

view.skin.php

<form name="update_view_write" action="<?php echo $board_skin_url; ?>/update.php" method="post" style="padding:0; margin:0;">
                <input type="hidden" name="bo_table" value="<?php echo $bo_table; ?>">
                <input type="hidden" name="page" value="<?php echo $page; ?>">
                <input type="hidden" name="wr_id" value="<?php echo $wr_id; ?>">
                <input type="hidden" name="location" value="next">

<input class='frm_input' type="text" value="<?=$write[wr_20]?>" name="wr_20"  id="wr_20" size="9"  itemname="테스트"><input type="submit" value=" 변경 " style="width:50px; height:34px;"></form>

 

 

update.php

<?php
include_once "../../../common.php";

 $write_table = $g5['write_prefix'].$_POST['bo_table'];
 sql_query("update ".$write_table." set wr_20 = ".$wr_20." where wr_id= '".$wr_id."' " );
 //exit;
header("location: $_SERVER[HTTP_REFERER]");
?>

이 질문에 댓글 쓰기 :

답변 1

sql_query("update ".$write_table." set wr_20 = '".$wr_20."' where wr_id= '".$wr_id."' " );

".$wr_20." 앞 뒤로 ' <--요게 있으면 될겁니다.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 13
© SIRSOFT
현재 페이지 제일 처음으로