N

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

· 2010-09-24 (금) 20:56:09 · 3154 · 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건
+
제목 글쓴이 날짜 조회
10-10-27 조회 3,280
10-10-27 조회 2,932
10-10-27 조회 2,175
10-10-26 조회 3,284
10-10-26 조회 2,262
10-10-26 조회 2,160
10-10-26 조회 2,170
10-10-25 조회 2,104
10-10-24 조회 2,283
10-10-24 조회 2,332
10-10-24 조회 2,620
10-10-24 조회 4,787
10-10-24 조회 3,304
10-10-23 조회 2,244
10-10-23 조회 3,056
10-10-22 조회 2,090
10-10-22 조회 2,244
10-10-22 조회 3,427
10-10-22 조회 3,147
10-10-22 조회 2,173
10-10-21 조회 2,480
10-10-21 조회 2,425
10-10-21 조회 2,464
10-10-21 조회 2,611
10-10-21 조회 2,351
10-10-21 조회 2,354
10-10-21 조회 2,262
10-10-21 조회 2,439
10-10-21 조회 2,371
10-10-21 조회 3,000
10-10-21 조회 2,146
10-10-20 조회 2,111
10-10-20 조회 2,845
10-10-19 조회 2,861
10-10-19 조회 2,699
10-10-19 조회 2,253
10-10-19 조회 2,989
10-10-19 조회 2,383
10-10-19 조회 3,010
10-10-19 조회 3,430
10-10-19 조회 2,984
10-10-19 조회 9,047
10-10-19 조회 2,577
10-10-19 조회 2,730
10-10-19 조회 2,505
10-10-18 조회 2,613
10-10-18 조회 2,525
10-10-18 조회 2,599
10-10-18 조회 2,294
10-10-18 조회 3,428
10-10-17 조회 2,422
10-10-17 조회 2,295
10-10-17 조회 3,001
10-10-17 조회 2,769
10-10-16 조회 2,437
10-10-16 조회 2,339
10-10-16 조회 2,437
10-10-16 조회 2,803
10-10-16 조회 2,180
10-10-15 조회 2,286
10-10-14 조회 2,455
10-10-14 조회 3,263
10-10-13 조회 2,441
10-10-13 조회 2,588
10-10-13 조회 2,292
10-10-13 조회 2,318
10-10-12 조회 2,748
10-10-12 조회 3,048
10-10-12 조회 2,326
10-10-12 조회 2,806
10-10-11 조회 2,966
10-10-09 조회 2,398
10-10-09 조회 2,248
10-10-07 조회 2,585
10-10-07 조회 2,515
10-10-07 조회 2,229
10-10-07 조회 2,559
10-10-07 조회 2,686
10-10-07 조회 2,691
10-10-06 조회 4,642
10-10-06 조회 2,108
10-10-06 조회 2,869
10-10-06 조회 2,235
10-10-06 조회 3,059
10-10-06 조회 2,055
10-10-06 조회 2,305
10-10-05 조회 2,210
10-10-05 조회 2,258
10-10-05 조회 3,163
10-10-05 조회 4,473
10-10-05 조회 3,403
10-10-05 조회 3,372
10-10-05 조회 2,205
10-10-05 조회 2,435
10-10-05 조회 2,294
10-10-04 조회 2,088
10-10-04 조회 2,477
10-10-04 조회 2,188
10-10-04 조회 2,708
10-10-04 조회 1,967