N

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

· 15년 전 · 1686 · 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년 전 조회 717
15년 전 조회 1,985
15년 전 조회 811
15년 전 조회 1,630
15년 전 조회 775
15년 전 조회 784
15년 전 조회 1,455
15년 전 조회 1,065
15년 전 조회 1,356
15년 전 조회 1,666
15년 전 조회 1,305
15년 전 조회 1,402
15년 전 조회 761
15년 전 조회 2,319
15년 전 조회 1,048
15년 전 조회 782
15년 전 조회 1,124
15년 전 조회 841
15년 전 조회 2,086
15년 전 조회 1,126
15년 전 조회 929
15년 전 조회 1,031
15년 전 조회 995
15년 전 조회 1,006
15년 전 조회 1,080
15년 전 조회 591
15년 전 조회 518
15년 전 조회 488
15년 전 조회 1,190
15년 전 조회 981
15년 전 조회 818
15년 전 조회 824
15년 전 조회 1,223
15년 전 조회 3,237
15년 전 조회 1,102
15년 전 조회 1,912
15년 전 조회 1,165
15년 전 조회 992
15년 전 조회 2,641
15년 전 조회 1,644
15년 전 조회 2,534
15년 전 조회 2,649
15년 전 조회 1,358
15년 전 조회 1,071
15년 전 조회 1,539
15년 전 조회 946
15년 전 조회 1,238
15년 전 조회 1,133
15년 전 조회 1,529
15년 전 조회 1,687
15년 전 조회 931
15년 전 조회 1,355
15년 전 조회 1,151
15년 전 조회 977
15년 전 조회 1,052
15년 전 조회 1,375
15년 전 조회 809
15년 전 조회 988
15년 전 조회 2,637
15년 전 조회 1,461
15년 전 조회 829
15년 전 조회 857
15년 전 조회 1,297
15년 전 조회 1,332
15년 전 조회 1,586
15년 전 조회 1,072
15년 전 조회 1,443
15년 전 조회 733
15년 전 조회 1,088
15년 전 조회 1,344
15년 전 조회 2,753
15년 전 조회 1,124
15년 전 조회 1,098
15년 전 조회 990
15년 전 조회 872
15년 전 조회 880
15년 전 조회 3,472
15년 전 조회 2,849
15년 전 조회 2,025
15년 전 조회 2,469
15년 전 조회 1,554
15년 전 조회 1,104
15년 전 조회 1,099
15년 전 조회 2,389
15년 전 조회 925
15년 전 조회 1,967
15년 전 조회 770
15년 전 조회 1,917
15년 전 조회 855
15년 전 조회 2,524
15년 전 조회 766
15년 전 조회 1,211
15년 전 조회 753
15년 전 조회 2,924
15년 전 조회 1,305
15년 전 조회 1,330
15년 전 조회 1,344
15년 전 조회 1,398
15년 전 조회 1,011
15년 전 조회 1,772