N

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

· 2010-09-24 (금) 20:56:09 · 3138 · 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건
+
제목 글쓴이 날짜 조회
11-10-25 조회 2,494
11-10-18 조회 4,024
11-10-18 조회 2,402
11-10-15 조회 3,622
11-10-10 조회 2,674
11-10-02 조회 2,592
11-09-28 조회 2,407
11-09-24 조회 2,492
11-09-22 조회 2,391
11-09-05 조회 2,878
11-08-31 조회 2,254
11-08-31 조회 2,562
11-08-31 조회 2,418
11-08-29 조회 2,965
11-08-28 조회 2,462
11-08-25 조회 2,514
11-08-17 조회 2,230
11-08-16 조회 2,464
11-08-11 조회 2,919
11-08-07 조회 2,632
11-08-03 조회 2,342
11-07-22 조회 2,085
11-07-12 조회 3,304
11-06-27 조회 2,088
11-06-01 조회 1,752
11-05-17 조회 2,538
11-05-01 조회 2,610
11-04-28 조회 2,897
11-04-28 조회 2,946
11-04-13 조회 2,605
11-03-27 조회 2,728
11-03-27 조회 2,605
11-03-14 조회 2,019
11-03-02 조회 2,343
11-03-02 조회 2,573
11-02-27 조회 3,000
11-02-23 조회 2,381
11-02-19 조회 2,522
11-02-14 조회 4,136
11-02-03 조회 2,929
11-01-24 조회 3,872
11-01-04 조회 2,403
10-12-08 조회 5,414
10-11-15 조회 2,424
10-11-14 조회 2,599
10-11-14 조회 3,614
10-10-29 조회 3,689
10-10-19 조회 2,701
10-10-07 조회 2,529
10-10-05 조회 4,446
10-09-18 조회 2,744
10-09-18 조회 2,482
10-09-17 조회 4,890
10-09-15 조회 2,828
10-09-15 조회 2,354
10-09-15 조회 2,846
10-09-15 조회 2,675
10-09-11 조회 4,002
10-09-11 조회 2,508
10-09-11 조회 2,545
10-09-07 조회 3,821
10-09-07 조회 3,358
10-08-29 조회 2,817
10-07-01 조회 3,067
10-06-30 조회 2,471
10-06-30 조회 2,653
10-06-30 조회 3,006
10-06-13 조회 2,042
10-04-15 조회 3,212
10-04-04 조회 3,445
10-02-23 조회 3,549
10-02-09 조회 3,146
10-01-25 조회 2,653
10-01-25 조회 2,753
09-12-27 조회 4,397
09-11-23 조회 3,621
09-11-20 조회 4,854
09-08-30 조회 3,052
09-08-30 조회 3,048
09-08-12 조회 3,015
09-07-22 조회 4,078
09-07-22 조회 4,725
09-07-15 조회 5,892
09-07-11 조회 2,968
09-06-17 조회 2,711
09-06-15 조회 2,998
09-05-29 조회 3,277
09-05-11 조회 5,914
09-05-08 조회 2,670
09-04-30 조회 3,787
09-04-17 조회 3,105
09-04-04 조회 3,288
09-03-05 조회 3,671
09-02-09 조회 3,639
09-02-03 조회 6,144
08-12-27 조회 3,208
08-12-20 조회 4,299
08-11-21 조회 5,259
08-11-14 조회 2,826
08-11-03 조회 3,290