변수를 포스트로 다음페이지로 넘기면 값이 공백이 있는 경우 공백전까지만 출력됩니다.

· 2013-08-23 (금) 12:10:05 · 3162 · 2
$wr_subject 를

-----------------------------------------------------------
<div style="width:710px;background-color:#000000;padding:5px 15px 5px 15px;_width:670px;_padding:5px 5px 5px 5px;color:#cccccc;">
<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=hidden name=wr_subject value=<?=$view['wr_subject']?>>
<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>
--------------------------------------------------------------------

<script type="text/javascript">

function tender_send()
{
var p = document.getElementById("point").value;

if (!p) {
// if (!p) {
alert("구매하실 번호를 입력해주세요.");
return;
}

if (confirm("정말 구매하시겠습니까?"))
document.auction_tender.submit();
}

</script>

-------------------------------------------------------------
자바스크립트를 거쳐서

---------------------------------------------------------------
<?
$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)
alert_only("구매하실 번호를 입력해주세요.");

tender_send($wr_id, $point, $wr_subject); // 텐더에 저장될 필요한 값을 넘겨주자~

?>
<script language=javascript>
alert("<?=number_format($point)?> 번호로 구매하였습니다.");
</script>
<?
include_once("$g4[path]/tail.sub.php");
?>

-------------------------------------------------------------

이 페이지에 도달하면

데이터 변수값이 공백이 있는 경우 첫번째 공백 앞까지만 잘려서 변수값이 넘어 옵니다.

어떤 원인인지? 여쭙습니다.
|

댓글 2개

value='asasas dfdfdf' <--이것 처럼 따옴표로 둘러싸지 않아서 입니다
값을 따옴표로 둘러싸는 것은 기본 중의 기본인데..
감사합니다. 제가 아주 초보라서 그렇습니다.
정말 가르침에 진심으로 감사드립니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-08-24 조회 2,651
13-08-24 조회 1,659
13-08-24 조회 1,659
13-08-23 조회 889
13-08-23 조회 1,666
13-08-23 조회 1,674
13-08-23 조회 2,622
13-08-23 조회 3,097
13-08-23 조회 2,057
13-08-23 조회 941
13-08-23 조회 950
13-08-23 조회 1,399
13-08-23 조회 928
13-08-23 조회 1,649
13-08-23 조회 1,933
13-08-23 조회 1,652
13-08-23 조회 1,983
13-08-23 조회 1,646
13-08-23 조회 1,090
13-08-23 조회 3,163