N

급 질문 입니다... select 메뉴 db 불러오기

· 15년 전 · 1714 · 2
4개의 db를 a1, a2, a3, a4라고 했을때
셀랙트박스로 불러 오는건 겨우 했습니다...
근데 그 값을 저장할수가 없습니다... 방법좀 찾아 주세요...
// 프로세싱 가격 가져오기
$order_opt1 = "$productInfor[a1]";
$order_opt2 = "$productInfor[a2]";
$order_opt3 = "$productInfor[a3]";
$order_opt4 = "$productInfor[a4]";


<input type=hidden name=local_pick value="<?= $reserveInfor[local_pick] ?>">

<select name='rate' class=form_box>
<option selected="selected" value="$productInfor[a1]"> Regular : $<?= $order_opt1 ?>/page </option>
<option value="$productInfor[a2]"> Fast : $<?= $order_opt2 ?>/page </option>
<option value="$productInfor[a3]"> Express : $<?= $order_opt3 ?>/page </option>
<option value="$productInfor[a4]"> Urgent : $<?= $order_opt4 ?>/page </option>
</select>


뭐가 잘못된거죠???????ㅠㅠ<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
|

댓글 2개

우의 코드를 보고는 잘 모르겠네요..
회원정보가 $data에 설정되고 거기서 성별항목이 sex이고 1인 경우 남자,2인 경우 여자일때
<select id="sex" name="sex">
<option value="0">선택</option>
<option value="1" <?php if($data["sex"] == 1) echo "selected";?>>남자</option>
<option value="2" <?php if($data["sex"] == 2) echo "selected";?>>여자</option>
</select>
이렇게 하면 sex가 1인 경우에는 남자로,2인 경우에는 여자로 표시됩니다.
$order_opt1 = "$productInfor[a1]"; ->> $order_opt1 = $productInfor[a1];

또는

<option selected="selected" value="$productInfor[a1]"> Regular : $<?= $productInfor[a1] ?>/page </option>

이런식으로 해보세요.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
15년 전 조회 746
15년 전 조회 2,008
15년 전 조회 850
15년 전 조회 1,659
15년 전 조회 807
15년 전 조회 811
15년 전 조회 1,490
15년 전 조회 1,092
15년 전 조회 1,383
15년 전 조회 1,698
15년 전 조회 1,336
15년 전 조회 1,428
15년 전 조회 798
15년 전 조회 2,350
15년 전 조회 1,077
15년 전 조회 809
15년 전 조회 1,150
15년 전 조회 864
15년 전 조회 2,120
15년 전 조회 1,157
15년 전 조회 954
15년 전 조회 1,061
15년 전 조회 1,018
15년 전 조회 1,046
15년 전 조회 1,109
15년 전 조회 620
15년 전 조회 544
15년 전 조회 513
15년 전 조회 1,215
15년 전 조회 1,011
15년 전 조회 843
15년 전 조회 846
15년 전 조회 1,240
15년 전 조회 3,264
15년 전 조회 1,132
15년 전 조회 1,937
15년 전 조회 1,188
15년 전 조회 1,020
15년 전 조회 2,673
15년 전 조회 1,673
15년 전 조회 2,560
15년 전 조회 2,683
15년 전 조회 1,393
15년 전 조회 1,104
15년 전 조회 1,568
15년 전 조회 976
15년 전 조회 1,262
15년 전 조회 1,165
15년 전 조회 1,559
15년 전 조회 1,715
15년 전 조회 954
15년 전 조회 1,389
15년 전 조회 1,180
15년 전 조회 1,005
15년 전 조회 1,070
15년 전 조회 1,400
15년 전 조회 843
15년 전 조회 1,021
15년 전 조회 2,659
15년 전 조회 1,488
15년 전 조회 858
15년 전 조회 888
15년 전 조회 1,326
15년 전 조회 1,362
15년 전 조회 1,614
15년 전 조회 1,100
15년 전 조회 1,466
15년 전 조회 759
15년 전 조회 1,118
15년 전 조회 1,367
15년 전 조회 2,777
15년 전 조회 1,155
15년 전 조회 1,121
15년 전 조회 1,014
15년 전 조회 905
15년 전 조회 903
15년 전 조회 3,505
15년 전 조회 2,872
15년 전 조회 2,051
15년 전 조회 2,499
15년 전 조회 1,584
15년 전 조회 1,136
15년 전 조회 1,132
15년 전 조회 2,414
15년 전 조회 956
15년 전 조회 1,996
15년 전 조회 799
15년 전 조회 1,945
15년 전 조회 881
15년 전 조회 2,552
15년 전 조회 797
15년 전 조회 1,231
15년 전 조회 784
15년 전 조회 2,952
15년 전 조회 1,333
15년 전 조회 1,366
15년 전 조회 1,377
15년 전 조회 1,423
15년 전 조회 1,034
15년 전 조회 1,799