N

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

· 15년 전 · 1637 · 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년 전 조회 677
15년 전 조회 1,927
15년 전 조회 767
15년 전 조회 1,577
15년 전 조회 734
15년 전 조회 741
15년 전 조회 1,407
15년 전 조회 1,027
15년 전 조회 1,313
15년 전 조회 1,617
15년 전 조회 1,259
15년 전 조회 1,348
15년 전 조회 714
15년 전 조회 2,267
15년 전 조회 1,005
15년 전 조회 741
15년 전 조회 1,082
15년 전 조회 789
15년 전 조회 2,041
15년 전 조회 1,078
15년 전 조회 898
15년 전 조회 993
15년 전 조회 945
15년 전 조회 960
15년 전 조회 1,031
15년 전 조회 539
15년 전 조회 464
15년 전 조회 438
15년 전 조회 1,144
15년 전 조회 940
15년 전 조회 785
15년 전 조회 784
15년 전 조회 1,187
15년 전 조회 3,193
15년 전 조회 1,057
15년 전 조회 1,864
15년 전 조회 1,130
15년 전 조회 951
15년 전 조회 2,592
15년 전 조회 1,592
15년 전 조회 2,493
15년 전 조회 2,603
15년 전 조회 1,321
15년 전 조회 1,022
15년 전 조회 1,503
15년 전 조회 902
15년 전 조회 1,197
15년 전 조회 1,095
15년 전 조회 1,494
15년 전 조회 1,638
15년 전 조회 904
15년 전 조회 1,317
15년 전 조회 1,107
15년 전 조회 937
15년 전 조회 1,009
15년 전 조회 1,328
15년 전 조회 767
15년 전 조회 949
15년 전 조회 2,605
15년 전 조회 1,417
15년 전 조회 785
15년 전 조회 815
15년 전 조회 1,257
15년 전 조회 1,291
15년 전 조회 1,546
15년 전 조회 1,032
15년 전 조회 1,401
15년 전 조회 699
15년 전 조회 1,045
15년 전 조회 1,302
15년 전 조회 2,714
15년 전 조회 1,077
15년 전 조회 1,054
15년 전 조회 957
15년 전 조회 833
15년 전 조회 844
15년 전 조회 3,437
15년 전 조회 2,802
15년 전 조회 1,982
15년 전 조회 2,428
15년 전 조회 1,521
15년 전 조회 1,065
15년 전 조회 1,060
15년 전 조회 2,339
15년 전 조회 886
15년 전 조회 1,925
15년 전 조회 728
15년 전 조회 1,880
15년 전 조회 813
15년 전 조회 2,488
15년 전 조회 734
15년 전 조회 1,168
15년 전 조회 716
15년 전 조회 2,885
15년 전 조회 1,262
15년 전 조회 1,291
15년 전 조회 1,302
15년 전 조회 1,363
15년 전 조회 971
15년 전 조회 1,731
🐛 버그신고