N

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

· 2010-09-24 (금) 20:56:09 · 3134 · 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>

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

프로그램

8,188건
+
제목 글쓴이 날짜 조회
10-10-04 조회 1,844
10-10-04 조회 2,771
10-10-03 조회 1,988
10-10-03 조회 2,505
10-10-02 조회 2,389
10-10-02 조회 1,985
10-10-02 조회 1,995
10-10-02 조회 1,904
10-10-02 조회 1,867
10-10-01 조회 2,085
10-10-01 조회 2,453
10-10-01 조회 3,569
10-10-01 조회 2,112
10-10-01 조회 2,231
10-10-01 조회 2,288
10-09-30 조회 2,237
10-09-30 조회 2,377
10-09-30 조회 1,950
10-09-30 조회 3,498
10-09-30 조회 2,048
10-09-30 조회 3,012
10-09-30 조회 2,005
10-09-30 조회 1,980
10-09-30 조회 2,885
10-09-30 조회 2,351
10-09-30 조회 2,601
10-09-30 조회 2,939
10-09-30 조회 2,591
10-09-30 조회 2,696
10-09-30 조회 2,118
10-09-29 조회 3,558
10-09-29 조회 2,319
10-09-29 조회 2,071
10-09-29 조회 2,467
10-09-29 조회 2,146
10-09-29 조회 3,434
10-09-30 조회 2,359
10-09-29 조회 2,127
10-09-29 조회 2,306
10-09-29 조회 2,267
10-09-29 조회 2,287
10-09-29 조회 2,332
10-09-29 조회 1,830
10-09-29 조회 1,784
10-09-29 조회 1,730
10-09-29 조회 2,404
10-09-29 조회 2,228
10-09-28 조회 2,015
10-09-28 조회 2,041
10-09-28 조회 2,410
10-09-28 조회 4,662
10-09-28 조회 2,557
10-09-28 조회 3,234
10-09-27 조회 2,409
10-09-27 조회 2,295
10-09-27 조회 3,949
10-09-26 조회 2,950
10-09-26 조회 3,824
10-09-26 조회 4,132
10-09-25 조회 2,748
10-09-25 조회 2,397
10-09-25 조회 2,794
10-09-25 조회 2,239
10-09-25 조회 2,528
10-09-25 조회 2,437
10-09-25 조회 2,807
10-09-24 조회 3,135
10-09-24 조회 2,240
10-09-24 조회 2,865
10-09-24 조회 2,568
10-09-24 조회 2,340
10-09-24 조회 2,404
10-09-23 조회 2,686
10-09-22 조회 2,070
10-09-21 조회 2,280
10-09-21 조회 3,933
10-09-21 조회 2,952
10-09-21 조회 2,130
10-09-21 조회 2,139
10-09-20 조회 2,636
10-09-20 조회 2,711
10-09-20 조회 3,086
10-09-19 조회 2,403
10-09-19 조회 2,785
10-09-19 조회 2,083
10-09-18 조회 2,462
10-09-18 조회 2,726
10-09-18 조회 4,113
10-09-18 조회 2,509
10-09-18 조회 2,476
10-09-18 조회 2,281
10-09-18 조회 2,207
10-09-17 조회 2,199
10-09-17 조회 4,871
10-09-17 조회 4,301
10-09-17 조회 3,515
10-09-17 조회 3,909
10-09-17 조회 3,014
10-09-17 조회 2,439
10-09-17 조회 2,568