N

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

· 15년 전 · 1632 · 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년 전 조회 730
15년 전 조회 737
15년 전 조회 1,404
15년 전 조회 1,023
15년 전 조회 1,310
15년 전 조회 1,612
15년 전 조회 1,254
15년 전 조회 1,345
15년 전 조회 711
15년 전 조회 2,261
15년 전 조회 1,001
15년 전 조회 737
15년 전 조회 1,079
15년 전 조회 785
15년 전 조회 2,034
15년 전 조회 1,076
15년 전 조회 893
15년 전 조회 989
15년 전 조회 941
15년 전 조회 955
15년 전 조회 1,025
15년 전 조회 536
15년 전 조회 459
15년 전 조회 435
15년 전 조회 1,138
15년 전 조회 936
15년 전 조회 780
15년 전 조회 780
15년 전 조회 1,181
15년 전 조회 3,187
15년 전 조회 1,053
15년 전 조회 1,857
15년 전 조회 1,123
15년 전 조회 946
15년 전 조회 2,587
15년 전 조회 1,587
15년 전 조회 2,489
15년 전 조회 2,599
15년 전 조회 1,317
15년 전 조회 1,017
15년 전 조회 1,496
15년 전 조회 899
15년 전 조회 1,193
15년 전 조회 1,091
15년 전 조회 1,491
15년 전 조회 1,633
15년 전 조회 898
15년 전 조회 1,312
15년 전 조회 1,101
15년 전 조회 932
15년 전 조회 1,005
15년 전 조회 1,325
15년 전 조회 763
15년 전 조회 945
15년 전 조회 2,601
15년 전 조회 1,413
15년 전 조회 781
15년 전 조회 812
15년 전 조회 1,252
15년 전 조회 1,287
15년 전 조회 1,542
15년 전 조회 1,027
15년 전 조회 1,396
15년 전 조회 693
15년 전 조회 1,040
15년 전 조회 1,299
15년 전 조회 2,709
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년 전 조회 811
15년 전 조회 2,483
15년 전 조회 729
15년 전 조회 1,162
15년 전 조회 713
15년 전 조회 2,879
15년 전 조회 1,256
15년 전 조회 1,289
15년 전 조회 1,301
15년 전 조회 1,360
15년 전 조회 966
15년 전 조회 1,725
🐛 버그신고