N

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

· 2010-09-24 (금) 20:56:09 · 3135 · 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,773
10-10-03 조회 1,989
10-10-03 조회 2,508
10-10-02 조회 2,392
10-10-02 조회 1,985
10-10-02 조회 1,996
10-10-02 조회 1,905
10-10-02 조회 1,869
10-10-01 조회 2,086
10-10-01 조회 2,455
10-10-01 조회 3,570
10-10-01 조회 2,113
10-10-01 조회 2,235
10-10-01 조회 2,289
10-09-30 조회 2,239
10-09-30 조회 2,379
10-09-30 조회 1,950
10-09-30 조회 3,501
10-09-30 조회 2,051
10-09-30 조회 3,015
10-09-30 조회 2,009
10-09-30 조회 1,983
10-09-30 조회 2,888
10-09-30 조회 2,353
10-09-30 조회 2,603
10-09-30 조회 2,941
10-09-30 조회 2,596
10-09-30 조회 2,699
10-09-30 조회 2,119
10-09-29 조회 3,559
10-09-29 조회 2,326
10-09-29 조회 2,073
10-09-29 조회 2,470
10-09-29 조회 2,151
10-09-29 조회 3,440
10-09-30 조회 2,365
10-09-29 조회 2,127
10-09-29 조회 2,308
10-09-29 조회 2,271
10-09-29 조회 2,289
10-09-29 조회 2,335
10-09-29 조회 1,836
10-09-29 조회 1,786
10-09-29 조회 1,733
10-09-29 조회 2,406
10-09-29 조회 2,229
10-09-28 조회 2,018
10-09-28 조회 2,042
10-09-28 조회 2,411
10-09-28 조회 4,664
10-09-28 조회 2,560
10-09-28 조회 3,241
10-09-27 조회 2,413
10-09-27 조회 2,298
10-09-27 조회 3,960
10-09-26 조회 2,953
10-09-26 조회 3,828
10-09-26 조회 4,138
10-09-25 조회 2,754
10-09-25 조회 2,399
10-09-25 조회 2,796
10-09-25 조회 2,242
10-09-25 조회 2,533
10-09-25 조회 2,440
10-09-25 조회 2,808
10-09-24 조회 3,136
10-09-24 조회 2,240
10-09-24 조회 2,868
10-09-24 조회 2,570
10-09-24 조회 2,342
10-09-24 조회 2,406
10-09-23 조회 2,687
10-09-22 조회 2,073
10-09-21 조회 2,285
10-09-21 조회 3,935
10-09-21 조회 2,958
10-09-21 조회 2,132
10-09-21 조회 2,142
10-09-20 조회 2,638
10-09-20 조회 2,714
10-09-20 조회 3,089
10-09-19 조회 2,407
10-09-19 조회 2,791
10-09-19 조회 2,087
10-09-18 조회 2,467
10-09-18 조회 2,739
10-09-18 조회 4,116
10-09-18 조회 2,516
10-09-18 조회 2,478
10-09-18 조회 2,287
10-09-18 조회 2,212
10-09-17 조회 2,202
10-09-17 조회 4,880
10-09-17 조회 4,305
10-09-17 조회 3,522
10-09-17 조회 3,916
10-09-17 조회 3,024
10-09-17 조회 2,442
10-09-17 조회 2,569