N

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

· 2010-09-24 (금) 20:56:09 · 3191 · 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-11-17 조회 2,327
10-11-16 조회 2,634
10-11-16 조회 2,134
10-11-16 조회 2,373
10-11-15 조회 2,846
10-11-15 조회 2,357
10-11-15 조회 3,099
10-11-15 조회 2,118
10-11-15 조회 2,227
10-11-15 조회 2,782
10-11-15 조회 2,482
10-11-14 조회 2,136
10-11-14 조회 4,346
10-11-14 조회 2,676
10-11-14 조회 3,688
10-11-13 조회 3,511
10-11-13 조회 2,493
10-11-13 조회 3,711
10-11-12 조회 2,318
10-11-12 조회 2,701
10-11-11 조회 3,872
10-11-11 조회 2,094
10-11-11 조회 2,708
10-11-10 조회 2,935
10-11-10 조회 2,201
10-11-10 조회 2,558
10-11-10 조회 2,040
10-11-09 조회 3,378
10-11-09 조회 2,890
10-11-09 조회 2,223
10-11-09 조회 1,924
10-11-09 조회 1,991
10-11-09 조회 2,530
10-11-09 조회 2,493
10-11-08 조회 1,907
10-11-08 조회 1,792
10-11-08 조회 2,079
10-11-08 조회 2,080
10-11-08 조회 3,002
10-11-08 조회 1,925
10-11-08 조회 2,069
10-11-08 조회 2,029
10-11-08 조회 2,287
10-11-08 조회 3,052
10-11-07 조회 2,944
10-11-07 조회 1.6만
10-11-07 조회 4,520
10-11-06 조회 2,079
10-11-06 조회 2,087
10-11-06 조회 2,240
10-11-06 조회 2,015
10-11-06 조회 1,978
10-11-06 조회 1.3만
10-11-05 조회 2,569
10-11-05 조회 2,537
10-11-05 조회 2,675
10-11-04 조회 2,578
10-11-04 조회 1,931
10-11-04 조회 2,790
10-11-04 조회 2,317
10-11-04 조회 1,957
10-11-04 조회 2,135
10-11-04 조회 2,196
10-11-04 조회 2,773
10-11-04 조회 2,126
10-11-04 조회 2,101
10-11-04 조회 2,328
10-11-03 조회 2,103
10-11-03 조회 2,967
10-11-03 조회 2,687
10-11-03 조회 4,264
10-11-03 조회 2,966
10-11-03 조회 1,993
10-11-03 조회 1,942
10-11-02 조회 2,166
10-11-02 조회 2,779
10-11-02 조회 2,804
10-11-01 조회 2,003
10-11-01 조회 2,097
10-11-01 조회 2,385
10-11-01 조회 2,594
10-10-31 조회 2,364
10-10-31 조회 2,314
10-10-31 조회 2,582
10-10-30 조회 1,991
10-10-30 조회 1,967
10-10-30 조회 2,489
10-10-30 조회 1,989
10-10-29 조회 3,157
10-10-29 조회 3,740
10-10-29 조회 2,175
10-10-29 조회 2,253
10-10-29 조회 3,128
10-10-28 조회 2,350
10-10-28 조회 2,449
10-10-28 조회 2,847
10-10-28 조회 3,006
10-10-28 조회 3,268
10-10-27 조회 2,568
10-10-27 조회 3,308