N

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

· 2010-09-24 (금) 20:56:09 · 3074 · 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개

2010-09-25 (토) 11:10:51
우의 코드를 보고는 잘 모르겠네요..
회원정보가 $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건
+
제목 글쓴이 날짜 조회
11-10-25 조회 2,362
11-10-18 조회 3,880
11-10-18 조회 2,306
11-10-15 조회 3,517
11-10-10 조회 2,583
11-10-02 조회 2,495
11-09-28 조회 2,334
11-09-24 조회 2,402
11-09-22 조회 2,328
11-09-05 조회 2,813
11-08-31 조회 2,158
11-08-31 조회 2,449
11-08-31 조회 2,318
11-08-29 조회 2,891
11-08-28 조회 2,364
11-08-25 조회 2,430
11-08-17 조회 2,140
11-08-16 조회 2,374
11-08-11 조회 2,840
11-08-07 조회 2,535
11-08-03 조회 2,271
11-07-22 조회 2,015
11-07-12 조회 3,228
11-06-27 조회 1,964
11-06-01 조회 1,709
11-05-17 조회 2,425
11-05-01 조회 2,551
11-04-28 조회 2,783
11-04-28 조회 2,893
11-04-13 조회 2,524
11-03-27 조회 2,667
11-03-27 조회 2,557
11-03-14 조회 1,971
11-03-02 조회 2,277
11-03-02 조회 2,512
11-02-27 조회 2,937
11-02-23 조회 2,335
11-02-19 조회 2,484
11-02-14 조회 4,079
11-02-03 조회 2,893
11-01-24 조회 3,828
11-01-04 조회 2,357
10-12-08 조회 5,339
10-11-15 조회 2,341
10-11-14 조회 2,515
10-11-14 조회 3,491
10-10-29 조회 3,638
10-10-19 조회 2,644
10-10-07 조회 2,471
10-10-05 조회 4,373
10-09-18 조회 2,665
10-09-18 조회 2,426
10-09-17 조회 4,805
10-09-15 조회 2,766
10-09-15 조회 2,298
10-09-15 조회 2,743
10-09-15 조회 2,598
10-09-11 조회 3,930
10-09-11 조회 2,442
10-09-11 조회 2,476
10-09-07 조회 3,749
10-09-07 조회 3,291
10-08-29 조회 2,750
10-07-01 조회 3,003
10-06-30 조회 2,390
10-06-30 조회 2,581
10-06-30 조회 2,942
10-06-13 조회 1,954
10-04-15 조회 3,151
10-04-04 조회 3,369
10-02-23 조회 3,437
10-02-09 조회 3,089
10-01-25 조회 2,577
10-01-25 조회 2,674
09-12-27 조회 4,321
09-11-23 조회 3,538
09-11-20 조회 4,781
09-08-30 조회 2,979
09-08-30 조회 2,986
09-08-12 조회 2,927
09-07-22 조회 3,990
09-07-22 조회 4,505
09-07-15 조회 5,834
09-07-11 조회 2,891
09-06-17 조회 2,653
09-06-15 조회 2,918
09-05-29 조회 3,206
09-05-11 조회 5,852
09-05-08 조회 2,600
09-04-30 조회 3,713
09-04-17 조회 3,034
09-04-04 조회 3,206
09-03-05 조회 3,593
09-02-09 조회 3,397
09-02-03 조회 6,066
08-12-27 조회 3,154
08-12-20 조회 4,249
08-11-21 조회 5,211
08-11-14 조회 2,755
08-11-03 조회 3,229