N

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

· 2010-09-24 (금) 20:56:09 · 3184 · 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,187건
+
제목 글쓴이 날짜 조회
10-09-17 조회 2,342
10-09-16 조회 3,428
10-09-16 조회 2,152
10-09-16 조회 3,288
10-09-16 조회 2,227
10-09-16 조회 3,912
10-09-16 조회 2,168
10-09-16 조회 2,657
10-09-16 조회 2,172
10-09-15 조회 4,502
10-09-15 조회 2,857
10-09-15 조회 2,848
10-09-15 조회 2,850
10-09-15 조회 2,884
10-09-15 조회 2,632
10-09-15 조회 3,344
10-09-15 조회 2,840
10-09-15 조회 2,416
10-09-15 조회 4,276
10-09-15 조회 2,694
10-09-15 조회 2,905
10-09-15 조회 2,605
10-09-15 조회 3,506
10-09-15 조회 3,523
10-09-15 조회 3,183
10-09-15 조회 2,536
10-09-15 조회 2,738
10-09-15 조회 2,397
10-09-15 조회 2,416
10-09-15 조회 2,605
10-09-14 조회 4,127
10-09-11 조회 4,065
10-09-11 조회 2,994
10-09-11 조회 2,511
10-09-11 조회 2,702
10-09-11 조회 2,685
10-09-11 조회 2,561
10-09-11 조회 2,478
10-09-11 조회 2,378
10-09-11 조회 2,727
10-09-11 조회 2,823
10-09-11 조회 2,454
10-09-11 조회 2,453
10-09-11 조회 2,633
10-09-11 조회 3,103
10-09-11 조회 2,613
10-09-08 조회 2,995
10-09-08 조회 2,727
10-09-07 조회 3,502
10-09-07 조회 4,568
10-09-07 조회 3,888
10-09-07 조회 2,441
10-09-07 조회 3,425
10-09-07 조회 3,714
10-09-04 조회 2,984
10-08-29 조회 2,869
10-08-27 조회 4,171
10-08-27 조회 4,177
10-08-20 조회 7,054
10-08-06 조회 2,968
10-07-30 조회 5,728
10-07-27 조회 2,833
10-07-15 조회 3,172
10-07-06 조회 3,244
10-07-01 조회 3,125
10-07-01 조회 2,646
10-07-01 조회 2,880
10-07-01 조회 3,134
10-06-30 조회 3,027
10-06-30 조회 3,896
10-06-30 조회 2,893
10-06-30 조회 2,996
10-06-30 조회 2,460
10-06-30 조회 2,588
10-06-30 조회 2,606
10-06-30 조회 2,532
10-06-30 조회 2,528
10-06-30 조회 2,557
10-06-30 조회 2,699
10-06-30 조회 2,716
10-06-30 조회 4,128
10-06-30 조회 2,468
10-06-30 조회 3,151
10-06-30 조회 3,055
10-06-17 조회 3,159
10-06-16 조회 2,854
10-06-14 조회 3,424
10-06-13 조회 2,113
10-06-11 조회 2,771
10-06-11 조회 2,670
10-06-11 조회 4,379
10-06-11 조회 4,760
10-06-11 조회 3,450
10-06-01 조회 2,950
10-05-31 조회 3,653
10-05-31 조회 3,070
10-05-31 조회 2,631
10-05-22 조회 5,307
10-05-18 조회 2,987
10-05-18 조회 3,022