N

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

· 15년 전 · 1952 · 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년 전 조회 925
15년 전 조회 2,184
15년 전 조회 1,032
15년 전 조회 1,852
15년 전 조회 974
15년 전 조회 994
15년 전 조회 1,657
15년 전 조회 1,262
15년 전 조회 1,575
15년 전 조회 1,882
15년 전 조회 1,511
15년 전 조회 1,605
15년 전 조회 983
15년 전 조회 2,518
15년 전 조회 1,257
15년 전 조회 981
15년 전 조회 1,338
15년 전 조회 1,044
15년 전 조회 2,317
15년 전 조회 1,349
15년 전 조회 1,144
15년 전 조회 1,245
15년 전 조회 1,209
15년 전 조회 1,233
15년 전 조회 1,298
15년 전 조회 805
15년 전 조회 743
15년 전 조회 711
15년 전 조회 1,401
15년 전 조회 1,202
15년 전 조회 1,040
15년 전 조회 1,036
15년 전 조회 1,433
15년 전 조회 3,464
15년 전 조회 1,336
15년 전 조회 2,132
15년 전 조회 1,386
15년 전 조회 1,220
15년 전 조회 2,880
15년 전 조회 1,854
15년 전 조회 2,758
15년 전 조회 2,860
15년 전 조회 1,594
15년 전 조회 1,297
15년 전 조회 1,785
15년 전 조회 1,205
15년 전 조회 1,500
15년 전 조회 1,383
15년 전 조회 1,788
15년 전 조회 1,953
15년 전 조회 1,201
15년 전 조회 1,632
15년 전 조회 1,426
15년 전 조회 1,242
15년 전 조회 1,294
15년 전 조회 1,626
15년 전 조회 1,057
15년 전 조회 1,239
15년 전 조회 2,884
15년 전 조회 1,718
15년 전 조회 1,087
15년 전 조회 1,111
15년 전 조회 1,569
15년 전 조회 1,596
15년 전 조회 1,861
15년 전 조회 1,349
15년 전 조회 1,724
15년 전 조회 992
15년 전 조회 1,348
15년 전 조회 1,634
15년 전 조회 3,010
15년 전 조회 1,406
15년 전 조회 1,372
15년 전 조회 1,246
15년 전 조회 1,142
15년 전 조회 1,146
15년 전 조회 3,756
15년 전 조회 3,140
15년 전 조회 2,295
15년 전 조회 2,746
15년 전 조회 1,838
15년 전 조회 1,371
15년 전 조회 1,373
15년 전 조회 2,677
15년 전 조회 1,211
15년 전 조회 2,267
15년 전 조회 1,052
15년 전 조회 2,201
15년 전 조회 1,138
15년 전 조회 2,813
15년 전 조회 1,068
15년 전 조회 1,505
15년 전 조회 1,048
15년 전 조회 3,288
15년 전 조회 1,627
15년 전 조회 1,636
15년 전 조회 1,657
15년 전 조회 1,721
15년 전 조회 1,310
15년 전 조회 2,072