N

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

· 2010-09-24 (금) 20:56:09 · 3174 · 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,187건
+
제목 글쓴이 날짜 조회
07-07-16 조회 3,134
07-07-06 조회 3,026
07-07-06 조회 3,461
07-06-23 조회 3,283
07-06-16 조회 2,793
07-05-20 조회 4,310
07-05-09 조회 3,483
07-05-09 조회 6,130
07-05-04 조회 2,720
07-04-30 조회 9,860
07-04-27 조회 4,356
07-04-26 조회 3,471
07-04-25 조회 5,321
07-04-18 조회 7,809
07-04-13 조회 3,150
07-04-12 조회 6,655
07-04-12 조회 5,071
07-04-12 조회 3,386
07-04-11 조회 5,743
07-04-05 조회 6,379
07-03-24 조회 4,443
07-03-20 조회 3,767
07-03-18 조회 4,005
07-03-18 조회 4,751
07-03-17 조회 4,251
07-03-16 조회 4,151
07-03-15 조회 5,319
07-03-13 조회 5,420
07-03-13 조회 3,599
07-03-08 조회 4,519
07-03-08 조회 4,010
07-03-08 조회 3,316
07-03-08 조회 4,205
07-03-05 조회 4,459
07-03-04 조회 2,938
07-03-01 조회 5,964
07-02-28 조회 3,249
07-02-27 조회 4,433
07-02-26 조회 3,355
07-02-26 조회 3,065
07-02-23 조회 3,691
07-02-23 조회 3,663
07-02-22 조회 4,041
07-02-22 조회 3,861
07-02-19 조회 3,868
07-02-17 조회 4,887
07-02-14 조회 8,196
07-02-12 조회 3,958
07-02-10 조회 3,591
07-02-02 조회 3,829
07-01-31 조회 3,518
07-01-29 조회 3,371
07-01-25 조회 5,139
07-01-21 조회 3,282
07-01-19 조회 3,076
06-12-15 조회 4,095
06-12-15 조회 4,487
06-12-15 조회 2,979
06-12-15 조회 4,530
06-12-15 조회 3,408
06-12-15 조회 4,116
06-12-15 조회 3,076
06-12-15 조회 2,799
06-12-15 조회 4,649
06-12-15 조회 3,202
06-12-15 조회 3,309
06-12-07 조회 4,757
06-12-07 조회 4,034
06-12-04 조회 4,688
06-11-27 조회 3,728
06-11-21 조회 4,029
06-11-15 조회 3,467
06-11-04 조회 3,360
06-10-29 조회 4,016
06-10-13 조회 3,879
06-10-13 조회 4,243
06-10-13 조회 4,204
06-10-12 조회 5,391
06-10-12 조회 4,312
06-10-04 조회 3,805
06-10-02 조회 4,581
06-09-29 조회 3,066
06-09-26 조회 3,416
06-09-26 조회 3,676
06-09-26 조회 3,313
06-09-26 조회 3,464
06-09-26 조회 4,379
06-09-25 조회 4,671
06-09-22 조회 5,016
06-09-22 조회 3,577
06-09-21 조회 4,358
06-09-21 조회 4,366
06-09-21 조회 3,568
06-09-21 조회 5,216
06-09-21 조회 3,742
06-09-21 조회 3,476
06-09-20 조회 3,063
06-09-15 조회 3,189
06-09-13 조회 3,498
06-09-11 조회 3,299