N

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

· 15년 전 · 1696 · 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년 전 조회 732
15년 전 조회 1,995
15년 전 조회 828
15년 전 조회 1,644
15년 전 조회 789
15년 전 조회 795
15년 전 조회 1,468
15년 전 조회 1,080
15년 전 조회 1,369
15년 전 조회 1,685
15년 전 조회 1,321
15년 전 조회 1,411
15년 전 조회 782
15년 전 조회 2,331
15년 전 조회 1,065
15년 전 조회 794
15년 전 조회 1,136
15년 전 조회 850
15년 전 조회 2,106
15년 전 조회 1,144
15년 전 조회 939
15년 전 조회 1,048
15년 전 조회 1,008
15년 전 조회 1,021
15년 전 조회 1,092
15년 전 조회 605
15년 전 조회 530
15년 전 조회 500
15년 전 조회 1,203
15년 전 조회 996
15년 전 조회 827
15년 전 조회 830
15년 전 조회 1,231
15년 전 조회 3,252
15년 전 조회 1,118
15년 전 조회 1,924
15년 전 조회 1,174
15년 전 조회 1,007
15년 전 조회 2,659
15년 전 조회 1,656
15년 전 조회 2,546
15년 전 조회 2,671
15년 전 조회 1,377
15년 전 조회 1,088
15년 전 조회 1,551
15년 전 조회 956
15년 전 조회 1,249
15년 전 조회 1,144
15년 전 조회 1,542
15년 전 조회 1,697
15년 전 조회 943
15년 전 조회 1,374
15년 전 조회 1,167
15년 전 조회 992
15년 전 조회 1,059
15년 전 조회 1,386
15년 전 조회 819
15년 전 조회 999
15년 전 조회 2,645
15년 전 조회 1,473
15년 전 조회 839
15년 전 조회 869
15년 전 조회 1,312
15년 전 조회 1,349
15년 전 조회 1,600
15년 전 조회 1,081
15년 전 조회 1,450
15년 전 조회 742
15년 전 조회 1,102
15년 전 조회 1,353
15년 전 조회 2,766
15년 전 조회 1,138
15년 전 조회 1,112
15년 전 조회 999
15년 전 조회 887
15년 전 조회 894
15년 전 조회 3,488
15년 전 조회 2,860
15년 전 조회 2,034
15년 전 조회 2,485
15년 전 조회 1,568
15년 전 조회 1,116
15년 전 조회 1,112
15년 전 조회 2,401
15년 전 조회 939
15년 전 조회 1,983
15년 전 조회 783
15년 전 조회 1,928
15년 전 조회 864
15년 전 조회 2,536
15년 전 조회 776
15년 전 조회 1,218
15년 전 조회 767
15년 전 조회 2,936
15년 전 조회 1,317
15년 전 조회 1,351
15년 전 조회 1,362
15년 전 조회 1,409
15년 전 조회 1,020
15년 전 조회 1,787