N

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

· 15년 전 · 1900 · 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년 전 조회 890
15년 전 조회 2,146
15년 전 조회 997
15년 전 조회 1,805
15년 전 조회 941
15년 전 조회 951
15년 전 조회 1,608
15년 전 조회 1,227
15년 전 조회 1,525
15년 전 조회 1,843
15년 전 조회 1,472
15년 전 조회 1,564
15년 전 조회 939
15년 전 조회 2,482
15년 전 조회 1,214
15년 전 조회 938
15년 전 조회 1,297
15년 전 조회 1,003
15년 전 조회 2,264
15년 전 조회 1,301
15년 전 조회 1,103
15년 전 조회 1,207
15년 전 조회 1,167
15년 전 조회 1,192
15년 전 조회 1,248
15년 전 조회 761
15년 전 조회 699
15년 전 조회 667
15년 전 조회 1,361
15년 전 조회 1,159
15년 전 조회 1,000
15년 전 조회 995
15년 전 조회 1,389
15년 전 조회 3,425
15년 전 조회 1,291
15년 전 조회 2,091
15년 전 조회 1,334
15년 전 조회 1,172
15년 전 조회 2,838
15년 전 조회 1,811
15년 전 조회 2,710
15년 전 조회 2,824
15년 전 조회 1,563
15년 전 조회 1,247
15년 전 조회 1,745
15년 전 조회 1,156
15년 전 조회 1,453
15년 전 조회 1,338
15년 전 조회 1,742
15년 전 조회 1,901
15년 전 조회 1,151
15년 전 조회 1,579
15년 전 조회 1,377
15년 전 조회 1,197
15년 전 조회 1,254
15년 전 조회 1,592
15년 전 조회 1,012
15년 전 조회 1,201
15년 전 조회 2,836
15년 전 조회 1,671
15년 전 조회 1,037
15년 전 조회 1,065
15년 전 조회 1,516
15년 전 조회 1,555
15년 전 조회 1,809
15년 전 조회 1,305
15년 전 조회 1,678
15년 전 조회 944
15년 전 조회 1,307
15년 전 조회 1,580
15년 전 조회 2,958
15년 전 조회 1,357
15년 전 조회 1,327
15년 전 조회 1,202
15년 전 조회 1,099
15년 전 조회 1,095
15년 전 조회 3,704
15년 전 조회 3,083
15년 전 조회 2,253
15년 전 조회 2,692
15년 전 조회 1,796
15년 전 조회 1,329
15년 전 조회 1,322
15년 전 조회 2,623
15년 전 조회 1,162
15년 전 조회 2,210
15년 전 조회 1,002
15년 전 조회 2,155
15년 전 조회 1,090
15년 전 조회 2,766
15년 전 조회 1,011
15년 전 조회 1,440
15년 전 조회 989
15년 전 조회 3,239
15년 전 조회 1,571
15년 전 조회 1,583
15년 전 조회 1,602
15년 전 조회 1,664
15년 전 조회 1,251
15년 전 조회 2,017