N

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

· 15년 전 · 1897 · 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,142
15년 전 조회 996
15년 전 조회 1,804
15년 전 조회 941
15년 전 조회 949
15년 전 조회 1,605
15년 전 조회 1,225
15년 전 조회 1,524
15년 전 조회 1,842
15년 전 조회 1,470
15년 전 조회 1,561
15년 전 조회 938
15년 전 조회 2,481
15년 전 조회 1,212
15년 전 조회 937
15년 전 조회 1,297
15년 전 조회 999
15년 전 조회 2,261
15년 전 조회 1,299
15년 전 조회 1,103
15년 전 조회 1,206
15년 전 조회 1,165
15년 전 조회 1,191
15년 전 조회 1,247
15년 전 조회 758
15년 전 조회 698
15년 전 조회 663
15년 전 조회 1,358
15년 전 조회 1,156
15년 전 조회 998
15년 전 조회 993
15년 전 조회 1,387
15년 전 조회 3,422
15년 전 조회 1,287
15년 전 조회 2,089
15년 전 조회 1,333
15년 전 조회 1,170
15년 전 조회 2,837
15년 전 조회 1,808
15년 전 조회 2,706
15년 전 조회 2,823
15년 전 조회 1,559
15년 전 조회 1,246
15년 전 조회 1,741
15년 전 조회 1,155
15년 전 조회 1,449
15년 전 조회 1,335
15년 전 조회 1,739
15년 전 조회 1,898
15년 전 조회 1,150
15년 전 조회 1,577
15년 전 조회 1,374
15년 전 조회 1,193
15년 전 조회 1,251
15년 전 조회 1,592
15년 전 조회 1,011
15년 전 조회 1,198
15년 전 조회 2,831
15년 전 조회 1,668
15년 전 조회 1,037
15년 전 조회 1,063
15년 전 조회 1,513
15년 전 조회 1,552
15년 전 조회 1,806
15년 전 조회 1,304
15년 전 조회 1,676
15년 전 조회 942
15년 전 조회 1,304
15년 전 조회 1,577
15년 전 조회 2,957
15년 전 조회 1,355
15년 전 조회 1,326
15년 전 조회 1,199
15년 전 조회 1,098
15년 전 조회 1,095
15년 전 조회 3,702
15년 전 조회 3,081
15년 전 조회 2,249
15년 전 조회 2,689
15년 전 조회 1,795
15년 전 조회 1,325
15년 전 조회 1,321
15년 전 조회 2,621
15년 전 조회 1,158
15년 전 조회 2,207
15년 전 조회 999
15년 전 조회 2,152
15년 전 조회 1,086
15년 전 조회 2,762
15년 전 조회 1,009
15년 전 조회 1,438
15년 전 조회 986
15년 전 조회 3,236
15년 전 조회 1,569
15년 전 조회 1,581
15년 전 조회 1,599
15년 전 조회 1,662
15년 전 조회 1,248
15년 전 조회 2,016