소스코드 문의드립니다. 채택완료
안녕하세요 질문좀드리겠습니다
아래와같이 소스를 넣어봤는데 안되는데 어떻게 해야나요 ㅠㅠ 부탁들겠습니다
</p>
<p><?</p>
<p>if ($it == 0) {</p>
<p>echo "준비중입니다";</p>
<p>} else {</p>
<p> <tr class="tr_price">
<th scope="row">판매가격</th>
<td>
<strong><?php echo display_price(get_price($it)); ?></strong>
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>"></p>
<p> </td>
</tr></p>
<p>}</p>
<p>?></p>
<p>
답변 5개
질문의 다변을 적확이 잘 받으시려면
이런식을로 올리셔야 잘받을수있습니다
$sql = " select it_id, it_sc_type, it_sc_method, it_sc_price, it_sc_minimum, it_sc_qty
from {$g5['g5_shop_item_table']}
where it_id = '$it_id' ";
$it = sql_fetch($sql);
<?
if ($it[it_price] == 0) {
echo "준비중입니다";
} else {
<tr class="tr_price">
<th scope="row">판매가격</th>
<td>
<strong><?php echo display_price(get_price($it)); ?></strong>
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
</td>
</tr>
}
?>
다시말하자면 $it 가 무엇인가가 중요하자나요
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
잠시만요 댓글이 좀길어졌네요
일단 조건을 $it으로 하시면안될거같아요 지금 $it으로 출력했더니 array로 출력되더라구요?
그럼 $it에서 가격을 따로 출력하는거부터 시작해야될거같습니다.
새로 다시 작성하자면 기존 원본으로 다시 돌리신 후에
<tr class="tr_price">
<th scope="row">판매가격</th>
<td>
<?php (if ($it["it_price"] == 0) { ?>
<strong>준비중입니다.</strong>
<php
} else {
<strong><?php echo display_price(get_price($it)); ?></strong>
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
}
?>
</td>
</tr>
이렇게 바꿔보세요. 가격들어가는곳만 준비중이라고 띄우면 되는게 맞나요?
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 5개
if ($it == 0) {
echo "준비중입니다";
}
이거를
if ($it == 0) { ?>
<tr>
<th scope="row">판매가격</th>
<td>
<strong>준비중입니다.</strong>
</td>
</tr>
<?php
}
<th scope="row">판매가격</th>
<td>
<strong><?php echo display_price(get_price($it)); ?></strong>
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
</td>
</tr>
이부분이 들어가야 합니당 ㅠㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인