N

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

· 15년 전 · 1651 · 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년 전 조회 693
15년 전 조회 1,940
15년 전 조회 781
15년 전 조회 1,587
15년 전 조회 744
15년 전 조회 752
15년 전 조회 1,419
15년 전 조회 1,038
15년 전 조회 1,326
15년 전 조회 1,633
15년 전 조회 1,270
15년 전 조회 1,366
15년 전 조회 727
15년 전 조회 2,280
15년 전 조회 1,015
15년 전 조회 751
15년 전 조회 1,095
15년 전 조회 799
15년 전 조회 2,054
15년 전 조회 1,089
15년 전 조회 907
15년 전 조회 1,006
15년 전 조회 957
15년 전 조회 971
15년 전 조회 1,037
15년 전 조회 553
15년 전 조회 479
15년 전 조회 453
15년 전 조회 1,153
15년 전 조회 950
15년 전 조회 795
15년 전 조회 792
15년 전 조회 1,196
15년 전 조회 3,204
15년 전 조회 1,069
15년 전 조회 1,878
15년 전 조회 1,138
15년 전 조회 961
15년 전 조회 2,604
15년 전 조회 1,601
15년 전 조회 2,503
15년 전 조회 2,615
15년 전 조회 1,333
15년 전 조회 1,031
15년 전 조회 1,513
15년 전 조회 912
15년 전 조회 1,206
15년 전 조회 1,105
15년 전 조회 1,503
15년 전 조회 1,652
15년 전 조회 914
15년 전 조회 1,329
15년 전 조회 1,116
15년 전 조회 947
15년 전 조회 1,019
15년 전 조회 1,344
15년 전 조회 776
15년 전 조회 958
15년 전 조회 2,616
15년 전 조회 1,430
15년 전 조회 798
15년 전 조회 828
15년 전 조회 1,267
15년 전 조회 1,304
15년 전 조회 1,559
15년 전 조회 1,048
15년 전 조회 1,413
15년 전 조회 710
15년 전 조회 1,054
15년 전 조회 1,311
15년 전 조회 2,723
15년 전 조회 1,087
15년 전 조회 1,067
15년 전 조회 968
15년 전 조회 840
15년 전 조회 855
15년 전 조회 3,448
15년 전 조회 2,813
15년 전 조회 1,995
15년 전 조회 2,441
15년 전 조회 1,532
15년 전 조회 1,077
15년 전 조회 1,072
15년 전 조회 2,357
15년 전 조회 896
15년 전 조회 1,940
15년 전 조회 736
15년 전 조회 1,889
15년 전 조회 827
15년 전 조회 2,496
15년 전 조회 744
15년 전 조회 1,178
15년 전 조회 724
15년 전 조회 2,896
15년 전 조회 1,271
15년 전 조회 1,301
15년 전 조회 1,311
15년 전 조회 1,372
15년 전 조회 982
15년 전 조회 1,744
🐛 버그신고