게시판에 별점기능 추가하기
관련링크
본문
영카트 상품 상세페이지 하단에 상품후기 부분의 별점을 이용해서 게시판에 별점을 추가하려고 합니다ㅠ
근데 write에서 체크한대로 list 나 view에서 출력이 안됩니다..
제발 도와주세요!!ㅠㅠ
write.skin.php 에는
<tr>
<th scope="row">평점</th>
<td>
<ul id="sit_use_write_star">
<li>
<input type="radio" name="is_score" value="5" id="is_score5" <?php echo ($is_score==5)?'checked="checked"':''; ?>>
<label for="is_score5">매우만족</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star5.png">
</li>
<li>
<input type="radio" name="is_score" value="4" id="is_score4" <?php echo ($is_score==4)?'checked="checked"':''; ?>>
<label for="is_score4">만족</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star4.png">
</li>
<li>
<input type="radio" name="is_score" value="3" id="is_score3" <?php echo ($is_score==3)?'checked="checked"':''; ?>>
<label for="is_score3">보통</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star3.png">
</li>
<li>
<input type="radio" name="is_score" value="2" id="is_score2" <?php echo ($is_score==2)?'checked="checked"':''; ?>>
<label for="is_score2">불만</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star2.png">
</li>
<li>
<input type="radio" name="is_score" value="1" id="is_score1" <?php echo ($is_score==1)?'checked="checked"':''; ?>>
<label for="is_score1">매우불만</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star1.png">
</li>
</ul>
</td>
</tr>
view.skin.php 에서
평점<img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $is_star; ?>.png" alt="별<?php echo $is_score; ?>개">
list.skin.php 에서
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $is_star; ?>.png" alt="별<?php echo $is_star; ?>개">
이렇게 추가해서 넣었는데..
혹시.. /img/s_star<?php echo $is_star; ?>.png 이게 (s_star1.png~s_star5.png)이미지명을 잘 못받아오는거 같은데..
혹시 어떻게 해결하면 될까요???ㅠㅠㅠ
!-->!-->!-->답변 1
write.skin.php
<tr>
<th scope="row">평점</th>
<td>
<ul id="sit_use_write_star">
<li>
<input type="radio" name="wr_1" value="5" id="is_score5" <?php echo ($write[wr_1]==5)?'checked="checked"':''; ?>> <label for="is_score5">매우만족</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star5.png">
</li>
<li>
<input type="radio" name="wr_1" value="4" id="is_score4" <?php echo ($write[wr_1]==4)?'checked="checked"':''; ?>>
<label for="is_score4">만족</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star4.png">
</li>
<li>
<input type="radio" name="wr_1" value="3" id="is_score3" <?php echo ($write[wr_1]==3)?'checked="checked"':''; ?>>
<label for="is_score3">보통</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star3.png">
</li>
<li>
<input type="radio" name="wr_1" value="2" id="is_score2" <?php echo ($write[wr_1]==2)?'checked="checked"':''; ?>>
<label for="is_score2">불만</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star2.png">
</li>
<li>
<input type="radio" name='wr_1" value="1" id="is_score1" <?php echo ($write[wr_1]==1)?'checked="checked"':''; ?>>
<label for="is_score1">매우불만</label>
<img src="<?php echo G5_URL; ?>/shop/img/s_star1.png">
</li>
</ul>
</td>
</tr>
list.skin.php
!--><img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $list[$i][wr_1]; ?>.png" alt="별<?php echo $list[$i][wr_1]; ?>개">
view.skin.php
[code]
<img src=
"<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $
list[$i][wr_1]; ?>.png"
alt=
"별<?php echo $
list[$i][wr_1]; ?>개"
>
[/code]이렇게 해보시길 바랍니다.
답변을 작성하시기 전에 로그인 해주세요.