N

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

· 2010-09-24 (금) 20:56:09 · 3144 · 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건
+
제목 글쓴이 날짜 조회
12-03-19 조회 3,583
12-03-16 조회 4,118
12-03-14 조회 4,002
12-03-13 조회 3,612
12-03-13 조회 4,467
12-03-12 조회 5,559
12-03-12 조회 1만
12-03-08 조회 6,110
12-03-06 조회 1.1만
12-03-06 조회 3,826
12-03-06 조회 6,328
12-03-02 조회 5,128
12-02-29 조회 3,670
12-02-27 조회 4,187
12-02-22 조회 3,720
12-02-20 조회 3,704
12-02-20 조회 6,780
12-02-01 조회 3,315
12-01-30 조회 8,850
12-01-29 조회 3,339
12-01-24 조회 3,665
12-01-21 조회 3,316
12-01-10 조회 3,780
11-12-26 조회 3,691
11-12-23 조회 5,112
11-12-23 조회 4,762
11-12-23 조회 4,367
11-12-23 조회 8,069
11-12-22 조회 3,804
11-12-17 조회 3,849
11-12-12 조회 3,264
11-12-08 조회 7,791
11-12-08 조회 3,614
11-12-07 조회 3,882
11-12-06 조회 5,643
11-12-02 조회 3,583
11-12-01 조회 3,205
11-11-30 조회 6,993
11-11-26 조회 3,951
11-11-24 조회 4,700
11-11-22 조회 3,089
11-11-22 조회 6,706
11-11-18 조회 5,139
11-11-16 조회 3,507
11-11-14 조회 3,535
11-11-12 조회 4,014
11-11-08 조회 3,334
11-11-06 조회 1만
11-11-06 조회 3,922
11-11-03 조회 5,610
11-11-02 조회 5,886
11-11-01 조회 9,404
11-10-19 조회 2,904
11-10-17 조회 2,686
11-10-10 조회 2,666
11-10-07 조회 3,419
11-10-06 조회 4,011
11-10-06 조회 2,569
11-10-02 조회 3,322
11-09-08 조회 4,337
11-09-08 조회 2,716
11-09-07 조회 2,686
11-09-02 조회 2,780
11-09-01 조회 3,729
11-08-28 조회 3,617
11-08-23 조회 3,439
11-08-22 조회 2,861
11-08-22 조회 2,447
11-08-13 조회 2,508
11-08-05 조회 2,952
11-08-03 조회 4,153
11-07-03 조회 2,633
11-06-15 조회 3,273
11-06-15 조회 3,111
11-05-15 조회 2,915
11-05-11 조회 5,645
11-04-12 조회 3,067
11-01-27 조회 3,890
11-01-26 조회 2,683
11-01-26 조회 4,520
11-01-18 조회 2,730
10-11-23 조회 2,961
10-10-24 조회 4,777
10-09-15 조회 4,469
10-09-07 조회 3,455
10-08-27 조회 4,134
10-08-20 조회 7,016
10-07-30 조회 5,699
10-06-30 조회 2,962
10-06-11 조회 4,717
10-06-11 조회 3,403
10-05-15 조회 4,248
10-05-10 조회 2,936
10-03-19 조회 5,480
10-03-05 조회 5,240
10-02-17 조회 5,681
09-11-21 조회 6,992
09-11-09 조회 4,054
09-11-04 조회 6,780
09-10-26 조회 3,909