N

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

· 15년 전 · 1675 · 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년 전 조회 707
15년 전 조회 1,971
15년 전 조회 803
15년 전 조회 1,615
15년 전 조회 766
15년 전 조회 780
15년 전 조회 1,443
15년 전 조회 1,057
15년 전 조회 1,343
15년 전 조회 1,655
15년 전 조회 1,291
15년 전 조회 1,392
15년 전 조회 749
15년 전 조회 2,304
15년 전 조회 1,036
15년 전 조회 777
15년 전 조회 1,113
15년 전 조회 824
15년 전 조회 2,071
15년 전 조회 1,114
15년 전 조회 922
15년 전 조회 1,022
15년 전 조회 983
15년 전 조회 995
15년 전 조회 1,065
15년 전 조회 577
15년 전 조회 503
15년 전 조회 475
15년 전 조회 1,175
15년 전 조회 974
15년 전 조회 811
15년 전 조회 814
15년 전 조회 1,214
15년 전 조회 3,228
15년 전 조회 1,091
15년 전 조회 1,899
15년 전 조회 1,156
15년 전 조회 987
15년 전 조회 2,631
15년 전 조회 1,629
15년 전 조회 2,524
15년 전 조회 2,637
15년 전 조회 1,350
15년 전 조회 1,061
15년 전 조회 1,535
15년 전 조회 933
15년 전 조회 1,226
15년 전 조회 1,128
15년 전 조회 1,522
15년 전 조회 1,676
15년 전 조회 926
15년 전 조회 1,345
15년 전 조회 1,139
15년 전 조회 968
15년 전 조회 1,041
15년 전 조회 1,365
15년 전 조회 798
15년 전 조회 981
15년 전 조회 2,633
15년 전 조회 1,452
15년 전 조회 819
15년 전 조회 848
15년 전 조회 1,284
15년 전 조회 1,325
15년 전 조회 1,575
15년 전 조회 1,070
15년 전 조회 1,433
15년 전 조회 726
15년 전 조회 1,070
15년 전 조회 1,334
15년 전 조회 2,740
15년 전 조회 1,111
15년 전 조회 1,085
15년 전 조회 981
15년 전 조회 862
15년 전 조회 874
15년 전 조회 3,466
15년 전 조회 2,838
15년 전 조회 2,013
15년 전 조회 2,459
15년 전 조회 1,545
15년 전 조회 1,096
15년 전 조회 1,093
15년 전 조회 2,374
15년 전 조회 921
15년 전 조회 1,960
15년 전 조회 758
15년 전 조회 1,912
15년 전 조회 845
15년 전 조회 2,516
15년 전 조회 763
15년 전 조회 1,198
15년 전 조회 745
15년 전 조회 2,911
15년 전 조회 1,290
15년 전 조회 1,321
15년 전 조회 1,331
15년 전 조회 1,390
15년 전 조회 1,000
15년 전 조회 1,758