여분필드문의드립니다
본문
게시판수정하다 막혀서 문의드립니다
게시판에 write.skin.php에
<?php $wr_2 = "10,000원"; ?>
<div id="bank_submit">
<input type="button" value="10,000원" onclick="document.getElementById('wr_2').value='10,000원';" class="cls_wr_2<?php echo ($wr_2=='10,000원') ? ' click-on' : ""?>">
<input type="button" value="30,000원" onclick="document.getElementById('wr_2').value='30,000원';" class="cls_wr_2<?php echo ($wr_2=='30,000원') ? ' click-on' : ""?>">
<input type="button" value="50,000원" onclick="document.getElementById('wr_2').value='50,000원';" class="cls_wr_2<?php echo ($wr_2=='50,000원') ? ' click-on' : ""?>">
<input type="button" value="100,000원" onclick="document.getElementById('wr_2').value='100,000원';" class="cls_wr_2<?php echo ($wr_2=='100,000원') ? ' click-on' : ""?>">
<input type="button" value="기타" onclick="document.getElementById('wr_2').value='기타';" class="cls_wr_2<?php echo ($wr_2=='기타') ? ' click-on' : ""?>">
스크립
$(".cls_wr_2").on("click", function() {
$(".click-on").removeClass("click-on");
$(this).addClass("click-on");
});
............................................................................................................................................................................................
wr_2라는 여분필드로 버튼을만들었는데요 선택을하고 넘어가면
view.skin.php 에서
<?php echo $view['wr_2'] ?> 하면 선택한게 안나오는데 다른방식으로 불러와야하나요???
답변 1
<input type="hidden" name="wr_2" id="wr_2" value="<?php echo $wr_2?>">
write.skin.php 파일에 이 구문이 있나요??