N

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

· 2010-09-24 (금) 20:56:09 · 3060 · 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,722
11-09-05 조회 2,594
11-09-02 조회 3,443
11-09-01 조회 2,522
11-09-01 조회 2,709
11-09-01 조회 3,987
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,624
11-08-17 조회 2,681
11-08-13 조회 2,489
11-08-11 조회 3,463
11-08-11 조회 2,687
11-08-08 조회 2,932
11-08-06 조회 2,672
11-08-06 조회 2,787
11-08-05 조회 2,990
11-08-05 조회 2,409
11-08-04 조회 2,860
11-08-02 조회 2,352
11-07-22 조회 3,924
11-07-21 조회 2,246
11-07-13 조회 2,618
11-07-08 조회 2,925
11-07-05 조회 2,065
11-06-28 조회 3,006
11-06-22 조회 2,512
11-06-22 조회 2,191
11-06-13 조회 2,291
11-06-07 조회 4,109
11-06-04 조회 2,915
11-05-19 조회 3,190
11-05-06 조회 2,936
11-04-20 조회 2,364
11-04-19 조회 2,504
11-04-05 조회 3,054
11-04-04 조회 2,968
11-04-03 조회 2,685
11-04-02 조회 2,804
11-04-01 조회 2,311
11-04-01 조회 2,461
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,728
11-03-05 조회 2,414
11-03-05 조회 4,902
11-03-02 조회 2,512
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,340
10-12-09 조회 2,424
10-12-09 조회 3,628
10-12-08 조회 3,608
10-12-08 조회 3,010
10-12-08 조회 2,847
10-12-08 조회 3,247
10-11-30 조회 2,612
10-11-25 조회 2,478
10-11-15 조회 2,237
10-11-14 조회 4,209
10-10-28 조회 2,890
10-10-26 조회 3,190
10-10-13 조회 2,468
10-10-12 조회 2,692
10-10-09 조회 2,275
10-10-05 조회 3,291
10-09-30 조회 2,954
10-09-26 조회 4,072
10-09-24 조회 2,818
10-09-20 조회 2,658
10-09-20 조회 3,028
10-09-18 조회 2,399
10-09-18 조회 2,440
10-09-17 조회 4,224
10-09-15 조회 3,219
10-09-15 조회 2,708
10-09-15 조회 2,563
10-09-15 조회 2,382
10-09-11 조회 2,541
10-09-11 조회 2,704
10-09-11 조회 2,956
10-06-30 조회 3,628
10-06-30 조회 2,449
10-06-30 조회 2,411
10-06-30 조회 2,560
10-06-11 조회 2,474