N

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

· 2010-09-24 (금) 20:56:09 · 3152 · 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건
+
제목 글쓴이 날짜 조회
16-07-13 조회 2,171
16-07-12 조회 2,353
16-07-12 조회 2,378
16-07-11 조회 2,193
16-06-05 조회 2,919
16-06-03 조회 3,035
16-05-26 조회 2,960
15-09-22 조회 4,989
15-06-10 조회 4,833
14-10-25 조회 6,359
14-10-22 조회 8,987
14-09-21 조회 5,792
14-09-16 조회 5,074
14-08-22 조회 1.1만
14-08-13 조회 5,905
14-08-12 조회 5,440
14-08-12 조회 6,301
14-08-11 조회 6,927
14-06-12 조회 6,207
14-06-11 조회 5,111
14-05-09 조회 5,424
14-05-09 조회 6,386
14-05-09 조회 6,416
14-05-08 조회 5,751
14-04-17 조회 4,750
14-04-16 조회 4,582
14-04-15 조회 4,587
14-04-15 조회 4,536
14-04-15 조회 4,307
14-04-14 조회 4,289
14-04-14 조회 4,259
14-04-14 조회 4,634
14-04-14 조회 4,780
14-04-14 조회 4,761
14-04-13 조회 4,667
14-04-12 조회 4,239
14-04-12 조회 4,379
14-04-12 조회 4,485
14-04-11 조회 5,009
14-04-10 조회 4,745
14-04-10 조회 4,779
14-04-09 조회 4,936
14-04-09 조회 5,306
14-04-08 조회 6,971
13-10-30 조회 7,654
13-07-11 조회 5,135
13-03-28 조회 1.1만
13-02-27 조회 6,789
13-02-14 조회 5,607
13-01-10 조회 4,522
12-12-31 조회 5,103
12-12-20 조회 6,121
12-12-12 조회 5,279
12-12-07 조회 4,501
12-11-28 조회 4,855
12-11-22 조회 5,295
12-11-12 조회 5,657
12-09-22 조회 4,513
12-09-18 조회 4,704