N

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

· 15년 전 · 1659 · 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년 전 조회 696
15년 전 조회 1,955
15년 전 조회 785
15년 전 조회 1,595
15년 전 조회 751
15년 전 조회 759
15년 전 조회 1,424
15년 전 조회 1,047
15년 전 조회 1,328
15년 전 조회 1,640
15년 전 조회 1,277
15년 전 조회 1,373
15년 전 조회 730
15년 전 조회 2,289
15년 전 조회 1,022
15년 전 조회 760
15년 전 조회 1,100
15년 전 조회 806
15년 전 조회 2,061
15년 전 조회 1,096
15년 전 조회 912
15년 전 조회 1,012
15년 전 조회 965
15년 전 조회 976
15년 전 조회 1,049
15년 전 조회 561
15년 전 조회 490
15년 전 조회 460
15년 전 조회 1,159
15년 전 조회 959
15년 전 조회 801
15년 전 조회 798
15년 전 조회 1,201
15년 전 조회 3,212
15년 전 조회 1,076
15년 전 조회 1,889
15년 전 조회 1,142
15년 전 조회 968
15년 전 조회 2,613
15년 전 조회 1,609
15년 전 조회 2,509
15년 전 조회 2,621
15년 전 조회 1,340
15년 전 조회 1,046
15년 전 조회 1,520
15년 전 조회 922
15년 전 조회 1,213
15년 전 조회 1,112
15년 전 조회 1,509
15년 전 조회 1,660
15년 전 조회 921
15년 전 조회 1,336
15년 전 조회 1,125
15년 전 조회 957
15년 전 조회 1,028
15년 전 조회 1,352
15년 전 조회 784
15년 전 조회 969
15년 전 조회 2,622
15년 전 조회 1,438
15년 전 조회 802
15년 전 조회 836
15년 전 조회 1,276
15년 전 조회 1,311
15년 전 조회 1,564
15년 전 조회 1,054
15년 전 조회 1,421
15년 전 조회 717
15년 전 조회 1,062
15년 전 조회 1,321
15년 전 조회 2,730
15년 전 조회 1,093
15년 전 조회 1,073
15년 전 조회 974
15년 전 조회 850
15년 전 조회 862
15년 전 조회 3,451
15년 전 조회 2,823
15년 전 조회 1,999
15년 전 조회 2,448
15년 전 조회 1,535
15년 전 조회 1,085
15년 전 조회 1,082
15년 전 조회 2,364
15년 전 조회 906
15년 전 조회 1,948
15년 전 조회 748
15년 전 조회 1,897
15년 전 조회 834
15년 전 조회 2,503
15년 전 조회 756
15년 전 조회 1,185
15년 전 조회 732
15년 전 조회 2,903
15년 전 조회 1,278
15년 전 조회 1,310
15년 전 조회 1,318
15년 전 조회 1,381
15년 전 조회 988
15년 전 조회 1,751