N

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

· 15년 전 · 1643 · 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년 전 조회 682
15년 전 조회 1,934
15년 전 조회 773
15년 전 조회 1,579
15년 전 조회 739
15년 전 조회 745
15년 전 조회 1,412
15년 전 조회 1,031
15년 전 조회 1,317
15년 전 조회 1,622
15년 전 조회 1,263
15년 전 조회 1,354
15년 전 조회 718
15년 전 조회 2,274
15년 전 조회 1,008
15년 전 조회 748
15년 전 조회 1,089
15년 전 조회 796
15년 전 조회 2,043
15년 전 조회 1,084
15년 전 조회 902
15년 전 조회 998
15년 전 조회 951
15년 전 조회 963
15년 전 조회 1,032
15년 전 조회 544
15년 전 조회 471
15년 전 조회 444
15년 전 조회 1,147
15년 전 조회 948
15년 전 조회 794
15년 전 조회 788
15년 전 조회 1,191
15년 전 조회 3,200
15년 전 조회 1,063
15년 전 조회 1,869
15년 전 조회 1,133
15년 전 조회 955
15년 전 조회 2,597
15년 전 조회 1,596
15년 전 조회 2,496
15년 전 조회 2,609
15년 전 조회 1,325
15년 전 조회 1,025
15년 전 조회 1,508
15년 전 조회 908
15년 전 조회 1,201
15년 전 조회 1,099
15년 전 조회 1,499
15년 전 조회 1,644
15년 전 조회 907
15년 전 조회 1,323
15년 전 조회 1,111
15년 전 조회 943
15년 전 조회 1,013
15년 전 조회 1,335
15년 전 조회 773
15년 전 조회 953
15년 전 조회 2,612
15년 전 조회 1,423
15년 전 조회 791
15년 전 조회 823
15년 전 조회 1,260
15년 전 조회 1,296
15년 전 조회 1,552
15년 전 조회 1,040
15년 전 조회 1,406
15년 전 조회 704
15년 전 조회 1,047
15년 전 조회 1,307
15년 전 조회 2,719
15년 전 조회 1,082
15년 전 조회 1,058
15년 전 조회 963
15년 전 조회 836
15년 전 조회 848
15년 전 조회 3,441
15년 전 조회 2,809
15년 전 조회 1,986
15년 전 조회 2,432
15년 전 조회 1,525
15년 전 조회 1,071
15년 전 조회 1,069
15년 전 조회 2,348
15년 전 조회 889
15년 전 조회 1,933
15년 전 조회 731
15년 전 조회 1,887
15년 전 조회 820
15년 전 조회 2,494
15년 전 조회 739
15년 전 조회 1,171
15년 전 조회 717
15년 전 조회 2,891
15년 전 조회 1,263
15년 전 조회 1,296
15년 전 조회 1,306
15년 전 조회 1,367
15년 전 조회 976
15년 전 조회 1,736
🐛 버그신고