N

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

· 2010-09-24 (금) 20:56:09 · 3094 · 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개

2010-09-25 (토) 11:10:51
우의 코드를 보고는 잘 모르겠네요..
회원정보가 $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,833
10-10-04 조회 2,763
10-10-03 조회 1,975
10-10-03 조회 2,497
10-10-02 조회 2,380
10-10-02 조회 1,980
10-10-02 조회 1,982
10-10-02 조회 1,892
10-10-02 조회 1,855
10-10-01 조회 2,069
10-10-01 조회 2,433
10-10-01 조회 3,537
10-10-01 조회 2,087
10-10-01 조회 2,214
10-10-01 조회 2,267
10-09-30 조회 2,215
10-09-30 조회 2,355
10-09-30 조회 1,915
10-09-30 조회 3,451
10-09-30 조회 2,013
10-09-30 조회 2,968
10-09-30 조회 1,973
10-09-30 조회 1,955
10-09-30 조회 2,860
10-09-30 조회 2,321
10-09-30 조회 2,571
10-09-30 조회 2,904
10-09-30 조회 2,555
10-09-30 조회 2,660
10-09-30 조회 2,079
10-09-29 조회 3,518
10-09-29 조회 2,291
10-09-29 조회 2,042
10-09-29 조회 2,438
10-09-29 조회 2,116
10-09-29 조회 3,402
10-09-30 조회 2,339
10-09-29 조회 2,115
10-09-29 조회 2,284
10-09-29 조회 2,242
10-09-29 조회 2,267
10-09-29 조회 2,311
10-09-29 조회 1,809
10-09-29 조회 1,755
10-09-29 조회 1,701
10-09-29 조회 2,380
10-09-29 조회 2,201
10-09-28 조회 1,992
10-09-28 조회 2,013
10-09-28 조회 2,382
10-09-28 조회 4,624
10-09-28 조회 2,527
10-09-28 조회 3,197
10-09-27 조회 2,383
10-09-27 조회 2,260
10-09-27 조회 3,899
10-09-26 조회 2,908
10-09-26 조회 3,778
10-09-26 조회 4,085
10-09-25 조회 2,712
10-09-25 조회 2,374
10-09-25 조회 2,771
10-09-25 조회 2,217
10-09-25 조회 2,500
10-09-25 조회 2,414
10-09-25 조회 2,781
10-09-24 조회 3,095
10-09-24 조회 2,204
10-09-24 조회 2,827
10-09-24 조회 2,521
10-09-24 조회 2,314
10-09-24 조회 2,386
10-09-23 조회 2,674
10-09-22 조회 2,054
10-09-21 조회 2,264
10-09-21 조회 3,900
10-09-21 조회 2,914
10-09-21 조회 2,098
10-09-21 조회 2,108
10-09-20 조회 2,599
10-09-20 조회 2,670
10-09-20 조회 3,045
10-09-19 조회 2,372
10-09-19 조회 2,747
10-09-19 조회 2,048
10-09-18 조회 2,414
10-09-18 조회 2,673
10-09-18 조회 4,060
10-09-18 조회 2,454
10-09-18 조회 2,432
10-09-18 조회 2,249
10-09-18 조회 2,173
10-09-17 조회 2,165
10-09-17 조회 4,814
10-09-17 조회 4,238
10-09-17 조회 3,444
10-09-17 조회 3,848
10-09-17 조회 2,952
10-09-17 조회 2,395
10-09-17 조회 2,528