N

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

· 2010-09-24 (금) 20:56:09 · 3151 · 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건
+
제목 글쓴이 날짜 조회
08-10-30 조회 2,718
08-10-30 조회 2,817
08-10-20 조회 2,545
08-10-11 조회 2,450
08-09-20 조회 4,192
08-09-20 조회 2,863
08-09-18 조회 2,748
08-09-18 조회 3,445
08-09-17 조회 3,307
08-09-05 조회 4,646
08-09-03 조회 2,779
08-08-18 조회 2,907
08-08-17 조회 2,646
08-08-13 조회 3,424
08-07-30 조회 3,484
08-07-28 조회 4,365
08-07-22 조회 5,592
08-07-22 조회 4,080
08-07-10 조회 3,048
08-07-08 조회 3,112
08-06-30 조회 3,871
08-06-30 조회 3,354
08-06-30 조회 3,670
08-06-14 조회 2,747
08-06-11 조회 7,108
08-06-05 조회 3,319
08-05-20 조회 4,834
08-05-13 조회 4,176
08-05-08 조회 3,127
08-05-08 조회 5,283
08-04-25 조회 4,079
08-04-22 조회 4,553
08-04-21 조회 3,191
08-04-17 조회 2,570
08-04-17 조회 2,971
08-04-17 조회 2,269
08-04-17 조회 5,238
08-04-17 조회 4,557
08-04-17 조회 4,550
08-04-17 조회 3,338
08-04-17 조회 3,157
08-04-17 조회 3,642
08-04-17 조회 5,005
08-04-17 조회 5,150
08-04-17 조회 3,360
08-04-04 조회 4,624
08-04-04 조회 2,851
08-04-04 조회 2,595
08-04-04 조회 2,821
08-04-04 조회 2,557
08-04-04 조회 2,800
08-04-03 조회 2,686
08-04-03 조회 2,754
08-04-02 조회 3,067
08-04-02 조회 3,224
08-03-31 조회 3,110
08-03-26 조회 4,289
08-03-11 조회 2,976
08-03-11 조회 2,385
08-03-11 조회 2,396
08-03-07 조회 4,232
08-03-07 조회 3,328
08-03-06 조회 4,773
08-03-04 조회 3,408
08-02-19 조회 3,798
08-02-03 조회 3,422
08-01-18 조회 4,011
08-01-15 조회 3,461
08-01-12 조회 4,305
08-01-12 조회 3,876
08-01-12 조회 3,828
07-12-24 조회 3,125
07-11-30 조회 3,964
07-11-08 조회 5,024
07-11-06 조회 3,872
07-10-26 조회 5,015
07-10-24 조회 4,204
07-10-22 조회 3,586
07-10-19 조회 4,774
07-10-09 조회 4,907
07-10-09 조회 6,773
07-10-05 조회 3,107
07-10-05 조회 4,042
07-10-03 조회 7,549
07-10-03 조회 3,600
07-10-03 조회 2,950
07-10-03 조회 2,878
07-09-28 조회 4,722
07-09-27 조회 3,786
07-09-27 조회 3,241
07-09-13 조회 3,389
07-08-28 조회 3,468
07-08-04 조회 4,852
07-08-01 조회 5,550
07-08-01 조회 4,949
07-07-30 조회 5,473
07-07-29 조회 3,621
07-07-21 조회 3,439
07-07-18 조회 5,396
07-07-16 조회 3,194