N

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

· 2010-09-24 (금) 20:56:09 · 3185 · 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-10-04 조회 2,811
10-10-03 조회 2,015
10-10-03 조회 2,530
10-10-02 조회 2,418
10-10-02 조회 2,007
10-10-02 조회 2,028
10-10-02 조회 1,932
10-10-02 조회 1,900
10-10-01 조회 2,117
10-10-01 조회 2,491
10-10-01 조회 3,605
10-10-01 조회 2,150
10-10-01 조회 2,268
10-10-01 조회 2,327
10-09-30 조회 2,279
10-09-30 조회 2,427
10-09-30 조회 2,003
10-09-30 조회 3,570
10-09-30 조회 2,109
10-09-30 조회 3,081
10-09-30 조회 2,073
10-09-30 조회 2,052
10-09-30 조회 2,946
10-09-30 조회 2,398
10-09-30 조회 2,646
10-09-30 조회 2,978
10-09-30 조회 2,627
10-09-30 조회 2,734
10-09-30 조회 2,153
10-09-29 조회 3,605
10-09-29 조회 2,355
10-09-29 조회 2,107
10-09-29 조회 2,500
10-09-29 조회 2,179
10-09-29 조회 3,470
10-09-30 조회 2,397
10-09-29 조회 2,166
10-09-29 조회 2,343
10-09-29 조회 2,305
10-09-29 조회 2,319
10-09-29 조회 2,362
10-09-29 조회 1,865
10-09-29 조회 1,819
10-09-29 조회 1,768
10-09-29 조회 2,443
10-09-29 조회 2,262
10-09-28 조회 2,053
10-09-28 조회 2,077
10-09-28 조회 2,448
10-09-28 조회 4,700
10-09-28 조회 2,593
10-09-28 조회 3,282
10-09-27 조회 2,461
10-09-27 조회 2,343
10-09-27 조회 4,016
10-09-26 조회 3,014
10-09-26 조회 3,893
10-09-26 조회 4,202
10-09-25 조회 2,823
10-09-25 조회 2,453
10-09-25 조회 2,834
10-09-25 조회 2,283
10-09-25 조회 2,579
10-09-25 조회 2,479
10-09-25 조회 2,846
10-09-24 조회 3,186
10-09-24 조회 2,281
10-09-24 조회 2,921
10-09-24 조회 2,622
10-09-24 조회 2,392
10-09-24 조회 2,456
10-09-23 조회 2,739
10-09-22 조회 2,120
10-09-21 조회 2,325
10-09-21 조회 3,967
10-09-21 조회 2,991
10-09-21 조회 2,169
10-09-21 조회 2,191
10-09-20 조회 2,686
10-09-20 조회 2,767
10-09-20 조회 3,135
10-09-19 조회 2,457
10-09-19 조회 2,841
10-09-19 조회 2,140
10-09-18 조회 2,525
10-09-18 조회 2,798
10-09-18 조회 4,178
10-09-18 조회 2,577
10-09-18 조회 2,546
10-09-18 조회 2,358
10-09-18 조회 2,273
10-09-17 조회 2,270
10-09-17 조회 4,946
10-09-17 조회 4,377
10-09-17 조회 3,607
10-09-17 조회 3,984
10-09-17 조회 3,089
10-09-17 조회 2,498
10-09-17 조회 2,628
10-09-17 조회 3,926