input 박스에서 0 을 입력하면 값이 전송이 되지 않나요? > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

input 박스에서 0 을 입력하면 값이 전송이 되지 않나요? 정보

input 박스에서 0 을 입력하면 값이 전송이 되지 않나요?

본문

input 박스에서 0 을 입력하여 서브밋을 하면 입력된 값이 없다고 값을 답는 페이지에서에서 경고창을 보냅니다.

해결 방법이 없을까요?

================= 입력페이지 ====================

 <form name=auction_tender id=auction_tender method=post action="<?=$board_skin_path?>/tender.php" target=hiddenframe style="margin:18px 0 0 0; float:left;">
      <input type=hidden name=bo_table value=<?=$bo_table?>>
      <input type=hidden name=wr_id value=<?=$wr_id?>>
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN00.png" onclick="document.getElementById('point').value='0'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN01.png" onclick="document.getElementById('point').value='1'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN02.png" onclick="document.getElementById('point').value='2'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN03.png" onclick="document.getElementById('point').value='3'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN04.png" onclick="document.getElementById('point').value='4'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN05.png" onclick="document.getElementById('point').value='5'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN06.png" onclick="document.getElementById('point').value='6'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN07.png" onclick="document.getElementById('point').value='7'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN08.png" onclick="document.getElementById('point').value='8'; return false;" />
      <input type="image" src="<?=$board_skin_path?>/img/ball/ballN09.png" onclick="document.getElementById('point').value='9'; return false;" />
<br />
      <input type=text name=point id=point value="" required numeric itemname="구매 번호" style=" border:1px solid #D3D3D3; width:80px; text-align:right; padding-right:10px;">
      번호를 구매하겠습니다.
      </form>


=====================값을 받는 페이지============

<?
$g4_path = "../../..";
include_once("$g4_path/common.php");

if (!$bo_table && !$wr_id)
    die("bo_table 혹은 wr_id 가 없습니다.");

include_once("$board_skin_path/auction.lib.php");
include_once("$g4[path]/head.sub.php");

if (!$write)
    alert_only("bo_table 과 wr_id 를 확인하십시오.");

if (!$point && !point==0)
    alert_only("구매하실 번호를 입력해주세요.");

tender_send($wr_id, $point);

?>



댓글 전체

단순히 if(!$point){} 조건문은 변수값이 없는 경우 뿐 아니라 0의 경우도 포함됩니다.
이 경우에는 if($point==''){} 혹은 if($point==null){} 등으로 처리하심이
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT