N

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

· 2010-09-24 (금) 20:56:09 · 3066 · 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-09-08 조회 2,723
11-09-05 조회 2,594
11-09-02 조회 3,446
11-09-01 조회 2,528
11-09-01 조회 2,712
11-09-01 조회 3,991
11-08-31 조회 2,730
11-08-28 조회 2,457
11-08-26 조회 2,365
11-08-19 조회 2,595
11-08-19 조회 2,515
11-08-17 조회 2,626
11-08-17 조회 2,687
11-08-13 조회 2,496
11-08-11 조회 3,469
11-08-11 조회 2,693
11-08-08 조회 2,938
11-08-06 조회 2,678
11-08-06 조회 2,789
11-08-05 조회 2,990
11-08-05 조회 2,415
11-08-04 조회 2,866
11-08-02 조회 2,353
11-07-22 조회 3,925
11-07-21 조회 2,247
11-07-13 조회 2,618
11-07-08 조회 2,926
11-07-05 조회 2,066
11-06-28 조회 3,012
11-06-22 조회 2,512
11-06-22 조회 2,191
11-06-13 조회 2,291
11-06-07 조회 4,111
11-06-04 조회 2,915
11-05-19 조회 3,190
11-05-06 조회 2,936
11-04-20 조회 2,365
11-04-19 조회 2,504
11-04-05 조회 3,054
11-04-04 조회 2,968
11-04-03 조회 2,685
11-04-02 조회 2,805
11-04-01 조회 2,311
11-04-01 조회 2,462
11-04-01 조회 3,056
11-03-25 조회 2,530
11-03-18 조회 2,226
11-03-17 조회 3,168
11-03-10 조회 2,310
11-03-10 조회 2,310
11-03-10 조회 2,562
11-03-07 조회 3,729
11-03-05 조회 2,415
11-03-05 조회 4,905
11-03-02 조회 2,513
11-03-01 조회 2,471
11-02-24 조회 2,542
11-02-24 조회 2,371
11-01-17 조회 5,098
11-01-14 조회 3,054
11-01-07 조회 3,051
10-12-29 조회 2,392
10-12-28 조회 2,606
10-12-24 조회 2,343
10-12-09 조회 2,426
10-12-09 조회 3,629
10-12-08 조회 3,609
10-12-08 조회 3,010
10-12-08 조회 2,851
10-12-08 조회 3,247
10-11-30 조회 2,617
10-11-25 조회 2,479
10-11-15 조회 2,237
10-11-14 조회 4,210
10-10-28 조회 2,890
10-10-26 조회 3,190
10-10-13 조회 2,469
10-10-12 조회 2,692
10-10-09 조회 2,275
10-10-05 조회 3,291
10-09-30 조회 2,954
10-09-26 조회 4,074
10-09-24 조회 2,818
10-09-20 조회 2,658
10-09-20 조회 3,032
10-09-18 조회 2,400
10-09-18 조회 2,442
10-09-17 조회 4,228
10-09-15 조회 3,220
10-09-15 조회 2,709
10-09-15 조회 2,564
10-09-15 조회 2,383
10-09-11 조회 2,542
10-09-11 조회 2,706
10-09-11 조회 2,956
10-06-30 조회 3,634
10-06-30 조회 2,450
10-06-30 조회 2,412
10-06-30 조회 2,562
10-06-11 조회 2,475