N

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

· 15년 전 · 1655 · 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년 전 조회 694
15년 전 조회 1,946
15년 전 조회 784
15년 전 조회 1,592
15년 전 조회 749
15년 전 조회 756
15년 전 조회 1,420
15년 전 조회 1,039
15년 전 조회 1,327
15년 전 조회 1,636
15년 전 조회 1,272
15년 전 조회 1,369
15년 전 조회 728
15년 전 조회 2,285
15년 전 조회 1,018
15년 전 조회 756
15년 전 조회 1,098
15년 전 조회 801
15년 전 조회 2,057
15년 전 조회 1,091
15년 전 조회 910
15년 전 조회 1,007
15년 전 조회 960
15년 전 조회 974
15년 전 조회 1,042
15년 전 조회 556
15년 전 조회 484
15년 전 조회 455
15년 전 조회 1,156
15년 전 조회 955
15년 전 조회 799
15년 전 조회 798
15년 전 조회 1,199
15년 전 조회 3,209
15년 전 조회 1,073
15년 전 조회 1,881
15년 전 조회 1,140
15년 전 조회 964
15년 전 조회 2,610
15년 전 조회 1,607
15년 전 조회 2,507
15년 전 조회 2,618
15년 전 조회 1,337
15년 전 조회 1,039
15년 전 조회 1,517
15년 전 조회 917
15년 전 조회 1,210
15년 전 조회 1,110
15년 전 조회 1,508
15년 전 조회 1,656
15년 전 조회 919
15년 전 조회 1,333
15년 전 조회 1,122
15년 전 조회 953
15년 전 조회 1,024
15년 전 조회 1,347
15년 전 조회 781
15년 전 조회 965
15년 전 조회 2,620
15년 전 조회 1,433
15년 전 조회 801
15년 전 조회 832
15년 전 조회 1,271
15년 전 조회 1,306
15년 전 조회 1,561
15년 전 조회 1,052
15년 전 조회 1,415
15년 전 조회 716
15년 전 조회 1,058
15년 전 조회 1,317
15년 전 조회 2,726
15년 전 조회 1,090
15년 전 조회 1,069
15년 전 조회 972
15년 전 조회 845
15년 전 조회 859
15년 전 조회 3,448
15년 전 조회 2,818
15년 전 조회 1,997
15년 전 조회 2,443
15년 전 조회 1,535
15년 전 조회 1,082
15년 전 조회 1,077
15년 전 조회 2,358
15년 전 조회 901
15년 전 조회 1,944
15년 전 조회 742
15년 전 조회 1,895
15년 전 조회 831
15년 전 조회 2,502
15년 전 조회 753
15년 전 조회 1,184
15년 전 조회 731
15년 전 조회 2,902
15년 전 조회 1,275
15년 전 조회 1,305
15년 전 조회 1,316
15년 전 조회 1,377
15년 전 조회 985
15년 전 조회 1,747
🐛 버그신고