N

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

· 2010-09-24 (금) 20:56:09 · 3145 · 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-05-18 조회 2,981
10-05-15 조회 4,251
10-05-10 조회 2,937
10-04-29 조회 5,624
10-04-28 조회 3,832
10-04-17 조회 4,770
10-04-15 조회 3,225
10-04-04 조회 3,458
10-04-02 조회 2,749
10-03-23 조회 5,939
10-03-19 조회 5,482
10-03-05 조회 5,242
10-03-01 조회 6,906
10-02-27 조회 5,068
10-02-26 조회 3,460
10-02-23 조회 3,415
10-02-23 조회 3,563
10-02-19 조회 3,260
10-02-17 조회 5,686
10-02-17 조회 4,417
10-02-17 조회 3,838
10-02-12 조회 3,170
10-02-12 조회 3,503
10-02-12 조회 3,825
10-02-11 조회 2,952
10-02-11 조회 4,030
10-02-09 조회 3,322
10-02-09 조회 3,443
10-02-09 조회 3,159
10-02-09 조회 3,812
10-02-09 조회 3,083
10-02-09 조회 3,421
10-01-26 조회 3,540
10-01-25 조회 2,668
10-01-25 조회 2,768
10-01-23 조회 3,379
10-01-23 조회 6,882
10-01-20 조회 3,109
10-01-19 조회 3,580
10-01-13 조회 3,785
10-01-07 조회 2,978
10-01-07 조회 2,767
10-01-07 조회 3,725
10-01-07 조회 6,424
09-12-31 조회 3,728
09-12-27 조회 4,409
09-12-18 조회 3,208
09-12-14 조회 5,232
09-12-14 조회 6,116
09-12-06 조회 4,814
09-11-26 조회 3,735
09-11-24 조회 3,868
09-11-24 조회 4,290
09-11-23 조회 3,634
09-11-21 조회 6,995
09-11-20 조회 4,868
09-11-19 조회 2,793
09-11-19 조회 3,147
09-11-13 조회 6,627
09-11-11 조회 3,746
09-11-09 조회 4,774
09-11-09 조회 4,056
09-11-09 조회 2,944
09-11-04 조회 6,780
09-10-26 조회 3,912
09-10-10 조회 7,406
09-10-09 조회 3,423
09-10-08 조회 5,380
09-09-19 조회 4,455
09-09-15 조회 3,588
09-09-14 조회 3,618
09-09-11 조회 5,806
09-09-04 조회 4,854
09-08-31 조회 4,199
09-08-31 조회 4,404
09-08-30 조회 3,478
09-08-30 조회 3,232
09-08-30 조회 3,061
09-08-30 조회 2,751
09-08-30 조회 3,060
09-08-30 조회 3,296
09-08-30 조회 2,988
09-08-16 조회 6,325
09-08-14 조회 5,304
09-08-12 조회 3,245
09-08-12 조회 3,031
09-08-12 조회 3,741
09-07-24 조회 5,995
09-07-23 조회 5,056
09-07-22 조회 4,087
09-07-22 조회 5,717
09-07-22 조회 4,741
09-07-22 조회 2,871
09-07-21 조회 2,761
09-07-21 조회 3,401
09-07-19 조회 3,283
09-07-17 조회 4,008
09-07-17 조회 3,544
09-07-17 조회 2,817
09-07-15 조회 5,901