N

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

· 15년 전 · 1653 · 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년 전 조회 693
15년 전 조회 1,945
15년 전 조회 782
15년 전 조회 1,587
15년 전 조회 744
15년 전 조회 754
15년 전 조회 1,419
15년 전 조회 1,038
15년 전 조회 1,327
15년 전 조회 1,633
15년 전 조회 1,270
15년 전 조회 1,366
15년 전 조회 727
15년 전 조회 2,281
15년 전 조회 1,016
15년 전 조회 753
15년 전 조회 1,096
15년 전 조회 799
15년 전 조회 2,054
15년 전 조회 1,089
15년 전 조회 909
15년 전 조회 1,007
15년 전 조회 959
15년 전 조회 971
15년 전 조회 1,039
15년 전 조회 553
15년 전 조회 480
15년 전 조회 453
15년 전 조회 1,154
15년 전 조회 953
15년 전 조회 796
15년 전 조회 793
15년 전 조회 1,197
15년 전 조회 3,205
15년 전 조회 1,070
15년 전 조회 1,878
15년 전 조회 1,138
15년 전 조회 961
15년 전 조회 2,608
15년 전 조회 1,604
15년 전 조회 2,504
15년 전 조회 2,616
15년 전 조회 1,334
15년 전 조회 1,034
15년 전 조회 1,514
15년 전 조회 913
15년 전 조회 1,207
15년 전 조회 1,106
15년 전 조회 1,505
15년 전 조회 1,654
15년 전 조회 916
15년 전 조회 1,330
15년 전 조회 1,116
15년 전 조회 948
15년 전 조회 1,021
15년 전 조회 1,345
15년 전 조회 777
15년 전 조회 960
15년 전 조회 2,618
15년 전 조회 1,431
15년 전 조회 798
15년 전 조회 830
15년 전 조회 1,267
15년 전 조회 1,306
15년 전 조회 1,559
15년 전 조회 1,049
15년 전 조회 1,413
15년 전 조회 711
15년 전 조회 1,057
15년 전 조회 1,313
15년 전 조회 2,725
15년 전 조회 1,087
15년 전 조회 1,067
15년 전 조회 969
15년 전 조회 842
15년 전 조회 855
15년 전 조회 3,448
15년 전 조회 2,815
15년 전 조회 1,996
15년 전 조회 2,442
15년 전 조회 1,535
15년 전 조회 1,079
15년 전 조회 1,072
15년 전 조회 2,358
15년 전 조회 897
15년 전 조회 1,940
15년 전 조회 738
15년 전 조회 1,891
15년 전 조회 829
15년 전 조회 2,500
15년 전 조회 747
15년 전 조회 1,178
15년 전 조회 724
15년 전 조회 2,899
15년 전 조회 1,272
15년 전 조회 1,302
15년 전 조회 1,314
15년 전 조회 1,374
15년 전 조회 984
15년 전 조회 1,744
🐛 버그신고