N

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

· 15년 전 · 1633 · 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년 전 조회 675
15년 전 조회 1,924
15년 전 조회 764
15년 전 조회 1,574
15년 전 조회 731
15년 전 조회 738
15년 전 조회 1,404
15년 전 조회 1,024
15년 전 조회 1,310
15년 전 조회 1,613
15년 전 조회 1,254
15년 전 조회 1,345
15년 전 조회 712
15년 전 조회 2,261
15년 전 조회 1,002
15년 전 조회 738
15년 전 조회 1,079
15년 전 조회 785
15년 전 조회 2,035
15년 전 조회 1,076
15년 전 조회 894
15년 전 조회 990
15년 전 조회 942
15년 전 조회 955
15년 전 조회 1,026
15년 전 조회 536
15년 전 조회 459
15년 전 조회 435
15년 전 조회 1,138
15년 전 조회 937
15년 전 조회 782
15년 전 조회 780
15년 전 조회 1,182
15년 전 조회 3,188
15년 전 조회 1,054
15년 전 조회 1,859
15년 전 조회 1,124
15년 전 조회 947
15년 전 조회 2,587
15년 전 조회 1,589
15년 전 조회 2,490
15년 전 조회 2,599
15년 전 조회 1,318
15년 전 조회 1,018
15년 전 조회 1,497
15년 전 조회 900
15년 전 조회 1,193
15년 전 조회 1,091
15년 전 조회 1,491
15년 전 조회 1,634
15년 전 조회 899
15년 전 조회 1,312
15년 전 조회 1,101
15년 전 조회 933
15년 전 조회 1,005
15년 전 조회 1,325
15년 전 조회 764
15년 전 조회 946
15년 전 조회 2,602
15년 전 조회 1,413
15년 전 조회 782
15년 전 조회 813
15년 전 조회 1,254
15년 전 조회 1,287
15년 전 조회 1,543
15년 전 조회 1,028
15년 전 조회 1,396
15년 전 조회 693
15년 전 조회 1,041
15년 전 조회 1,299
15년 전 조회 2,710
15년 전 조회 1,075
15년 전 조회 1,051
15년 전 조회 953
15년 전 조회 830
15년 전 조회 840
15년 전 조회 3,434
15년 전 조회 2,800
15년 전 조회 1,979
15년 전 조회 2,426
15년 전 조회 1,519
15년 전 조회 1,061
15년 전 조회 1,057
15년 전 조회 2,336
15년 전 조회 883
15년 전 조회 1,923
15년 전 조회 722
15년 전 조회 1,876
15년 전 조회 812
15년 전 조회 2,483
15년 전 조회 729
15년 전 조회 1,163
15년 전 조회 713
15년 전 조회 2,880
15년 전 조회 1,256
15년 전 조회 1,289
15년 전 조회 1,301
15년 전 조회 1,360
15년 전 조회 967
15년 전 조회 1,726
🐛 버그신고