N

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

· 2010-09-24 (금) 20:56:09 · 3198 · 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건
+
제목 글쓴이 날짜 조회
09-07-11 조회 3,288
09-06-29 조회 3,661
09-06-26 조회 5,280
09-06-25 조회 4,201
09-06-25 조회 2,880
09-06-18 조회 5,446
09-06-17 조회 2,776
09-06-15 조회 2,998
09-06-15 조회 2,632
09-06-15 조회 3,172
09-06-15 조회 3,051
09-06-15 조회 3,076
09-06-15 조회 2,943
09-06-09 조회 3,621
09-05-29 조회 3,238
09-05-29 조회 3,368
09-05-28 조회 3,665
09-05-22 조회 3,054
09-05-16 조회 3,901
09-05-14 조회 3,632
09-05-11 조회 6,000
09-05-08 조회 2,755
09-05-06 조회 2,453
09-05-05 조회 3,542
09-05-04 조회 3,381
09-05-01 조회 2,962
09-04-30 조회 3,521
09-04-30 조회 3,881
09-04-18 조회 2,797
09-04-17 조회 3,201
09-04-13 조회 3,397
09-04-13 조회 2,480
09-04-13 조회 3,192
09-04-13 조회 2,794
09-04-10 조회 3,314
09-04-10 조회 2,743
09-04-07 조회 3,749
09-04-04 조회 3,381
09-04-02 조회 7,349
09-03-19 조회 3,343
09-03-15 조회 5,194
09-03-15 조회 2,826
09-03-13 조회 3,120
09-03-10 조회 3,472
09-03-05 조회 4,016
09-03-05 조회 3,746
09-02-27 조회 4,280
09-02-23 조회 4,549
09-02-23 조회 4,532
09-02-21 조회 3,287
09-02-21 조회 2,901
09-02-17 조회 2,868
09-02-17 조회 3,251
09-02-17 조회 2,627
09-02-17 조회 3,415
09-02-17 조회 3,150
09-02-13 조회 2,953
09-02-09 조회 2,773
09-02-09 조회 3,620
09-02-09 조회 4,668
09-02-09 조회 3,746
09-02-09 조회 3,228
09-02-09 조회 2,981
09-02-05 조회 3,453
09-02-03 조회 6,226
09-01-30 조회 2,974
09-01-25 조회 3,656
09-01-24 조회 3,760
09-01-23 조회 3,934
09-01-23 조회 3,549
09-01-20 조회 5,929
09-01-20 조회 4,360
09-01-17 조회 4,373
09-01-17 조회 3,039
09-01-15 조회 2,609
09-01-14 조회 5,333
09-01-10 조회 3,149
09-01-09 조회 3,052
09-01-08 조회 3,564
09-01-08 조회 3,332
09-01-06 조회 2,988
09-01-05 조회 5,251
08-12-30 조회 3,148
08-12-30 조회 4,572
08-12-29 조회 4,417
08-12-27 조회 2,415
08-12-27 조회 3,286
08-12-27 조회 2,933
08-12-27 조회 3,217
08-12-20 조회 3,978
08-12-20 조회 4,367
08-12-13 조회 4,596
08-12-12 조회 4,667
08-12-12 조회 2,773
08-12-11 조회 2,779
08-12-10 조회 3,598
08-12-06 조회 3,347
08-11-30 조회 3,687
08-11-27 조회 4,231
08-11-26 조회 4,645