N

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

· 15년 전 · 2086 · 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>

이런식으로 해보세요.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
15년 전 조회 1,049
15년 전 조회 2,327
15년 전 조회 1,172
15년 전 조회 1,967
15년 전 조회 1,102
15년 전 조회 1,130
15년 전 조회 1,790
15년 전 조회 1,392
15년 전 조회 1,710
15년 전 조회 2,011
15년 전 조회 1,630
15년 전 조회 1,728
15년 전 조회 1,110
15년 전 조회 2,643
15년 전 조회 1,382
15년 전 조회 1,106
15년 전 조회 1,462
15년 전 조회 1,163
15년 전 조회 2,445
15년 전 조회 1,459
15년 전 조회 1,281
15년 전 조회 1,387
15년 전 조회 1,338
15년 전 조회 1,379
15년 전 조회 1,429
15년 전 조회 937
15년 전 조회 878
15년 전 조회 851
15년 전 조회 1,536
15년 전 조회 1,336
15년 전 조회 1,172
15년 전 조회 1,167
15년 전 조회 1,574
15년 전 조회 3,618
15년 전 조회 1,474
15년 전 조회 2,260
15년 전 조회 1,538
15년 전 조회 1,343
15년 전 조회 3,026
15년 전 조회 1,991
15년 전 조회 2,876
15년 전 조회 2,983
15년 전 조회 1,721
15년 전 조회 1,443
15년 전 조회 1,938
15년 전 조회 1,371
15년 전 조회 1,651
15년 전 조회 1,556
15년 전 조회 1,942
15년 전 조회 2,087
15년 전 조회 1,367
15년 전 조회 1,794
15년 전 조회 1,577
15년 전 조회 1,417
15년 전 조회 1,474
15년 전 조회 1,800
15년 전 조회 1,236
15년 전 조회 1,425
15년 전 조회 3,057
15년 전 조회 1,890
15년 전 조회 1,254
15년 전 조회 1,289
15년 전 조회 1,739
15년 전 조회 1,783
15년 전 조회 2,026
15년 전 조회 1,537
15년 전 조회 1,890
15년 전 조회 1,178
15년 전 조회 1,520
15년 전 조회 1,812
15년 전 조회 3,205
15년 전 조회 1,569
15년 전 조회 1,562
15년 전 조회 1,436
15년 전 조회 1,325
15년 전 조회 1,342
15년 전 조회 3,921
15년 전 조회 3,329
15년 전 조회 2,474
15년 전 조회 2,908
15년 전 조회 2,009
15년 전 조회 1,564
15년 전 조회 1,564
15년 전 조회 2,877
15년 전 조회 1,407
15년 전 조회 2,447
15년 전 조회 1,249
15년 전 조회 2,387
15년 전 조회 1,324
15년 전 조회 3,013
15년 전 조회 1,267
15년 전 조회 1,699
15년 전 조회 1,236
15년 전 조회 3,449
15년 전 조회 1,813
15년 전 조회 1,823
15년 전 조회 1,849
15년 전 조회 1,896
15년 전 조회 1,495
15년 전 조회 2,254