N

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

· 2010-09-24 (금) 20:56:09 · 3131 · 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-04 조회 1,844
10-10-04 조회 2,771
10-10-03 조회 1,988
10-10-03 조회 2,505
10-10-02 조회 2,388
10-10-02 조회 1,985
10-10-02 조회 1,994
10-10-02 조회 1,901
10-10-02 조회 1,866
10-10-01 조회 2,084
10-10-01 조회 2,453
10-10-01 조회 3,565
10-10-01 조회 2,109
10-10-01 조회 2,227
10-10-01 조회 2,284
10-09-30 조회 2,231
10-09-30 조회 2,374
10-09-30 조회 1,949
10-09-30 조회 3,494
10-09-30 조회 2,048
10-09-30 조회 3,008
10-09-30 조회 2,004
10-09-30 조회 1,977
10-09-30 조회 2,879
10-09-30 조회 2,339
10-09-30 조회 2,596
10-09-30 조회 2,934
10-09-30 조회 2,587
10-09-30 조회 2,691
10-09-30 조회 2,117
10-09-29 조회 3,556
10-09-29 조회 2,316
10-09-29 조회 2,069
10-09-29 조회 2,466
10-09-29 조회 2,145
10-09-29 조회 3,431
10-09-30 조회 2,356
10-09-29 조회 2,125
10-09-29 조회 2,304
10-09-29 조회 2,266
10-09-29 조회 2,286
10-09-29 조회 2,329
10-09-29 조회 1,828
10-09-29 조회 1,782
10-09-29 조회 1,729
10-09-29 조회 2,402
10-09-29 조회 2,221
10-09-28 조회 2,010
10-09-28 조회 2,039
10-09-28 조회 2,408
10-09-28 조회 4,659
10-09-28 조회 2,554
10-09-28 조회 3,232
10-09-27 조회 2,407
10-09-27 조회 2,292
10-09-27 조회 3,947
10-09-26 조회 2,949
10-09-26 조회 3,822
10-09-26 조회 4,129
10-09-25 조회 2,748
10-09-25 조회 2,394
10-09-25 조회 2,790
10-09-25 조회 2,237
10-09-25 조회 2,527
10-09-25 조회 2,435
10-09-25 조회 2,805
10-09-24 조회 3,132
10-09-24 조회 2,238
10-09-24 조회 2,864
10-09-24 조회 2,566
10-09-24 조회 2,336
10-09-24 조회 2,400
10-09-23 조회 2,685
10-09-22 조회 2,065
10-09-21 조회 2,277
10-09-21 조회 3,929
10-09-21 조회 2,951
10-09-21 조회 2,128
10-09-21 조회 2,135
10-09-20 조회 2,633
10-09-20 조회 2,709
10-09-20 조회 3,082
10-09-19 조회 2,400
10-09-19 조회 2,782
10-09-19 조회 2,076
10-09-18 조회 2,458
10-09-18 조회 2,725
10-09-18 조회 4,109
10-09-18 조회 2,504
10-09-18 조회 2,472
10-09-18 조회 2,279
10-09-18 조회 2,205
10-09-17 조회 2,193
10-09-17 조회 4,865
10-09-17 조회 4,296
10-09-17 조회 3,511
10-09-17 조회 3,904
10-09-17 조회 3,010
10-09-17 조회 2,436
10-09-17 조회 2,564