N

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

· 15년 전 · 1711 · 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년 전 조회 745
15년 전 조회 2,003
15년 전 조회 846
15년 전 조회 1,657
15년 전 조회 802
15년 전 조회 808
15년 전 조회 1,483
15년 전 조회 1,088
15년 전 조회 1,377
15년 전 조회 1,694
15년 전 조회 1,334
15년 전 조회 1,423
15년 전 조회 795
15년 전 조회 2,344
15년 전 조회 1,074
15년 전 조회 807
15년 전 조회 1,145
15년 전 조회 861
15년 전 조회 2,116
15년 전 조회 1,155
15년 전 조회 950
15년 전 조회 1,057
15년 전 조회 1,015
15년 전 조회 1,042
15년 전 조회 1,105
15년 전 조회 612
15년 전 조회 542
15년 전 조회 511
15년 전 조회 1,212
15년 전 조회 1,008
15년 전 조회 837
15년 전 조회 838
15년 전 조회 1,238
15년 전 조회 3,262
15년 전 조회 1,128
15년 전 조회 1,933
15년 전 조회 1,181
15년 전 조회 1,019
15년 전 조회 2,670
15년 전 조회 1,671
15년 전 조회 2,558
15년 전 조회 2,682
15년 전 조회 1,384
15년 전 조회 1,100
15년 전 조회 1,565
15년 전 조회 973
15년 전 조회 1,260
15년 전 조회 1,161
15년 전 조회 1,555
15년 전 조회 1,712
15년 전 조회 950
15년 전 조회 1,385
15년 전 조회 1,178
15년 전 조회 1,005
15년 전 조회 1,068
15년 전 조회 1,398
15년 전 조회 838
15년 전 조회 1,014
15년 전 조회 2,657
15년 전 조회 1,486
15년 전 조회 853
15년 전 조회 884
15년 전 조회 1,321
15년 전 조회 1,357
15년 전 조회 1,611
15년 전 조회 1,095
15년 전 조회 1,462
15년 전 조회 756
15년 전 조회 1,116
15년 전 조회 1,365
15년 전 조회 2,775
15년 전 조회 1,150
15년 전 조회 1,119
15년 전 조회 1,013
15년 전 조회 901
15년 전 조회 901
15년 전 조회 3,500
15년 전 조회 2,868
15년 전 조회 2,048
15년 전 조회 2,494
15년 전 조회 1,583
15년 전 조회 1,129
15년 전 조회 1,128
15년 전 조회 2,411
15년 전 조회 954
15년 전 조회 1,995
15년 전 조회 798
15년 전 조회 1,941
15년 전 조회 878
15년 전 조회 2,548
15년 전 조회 792
15년 전 조회 1,226
15년 전 조회 777
15년 전 조회 2,950
15년 전 조회 1,328
15년 전 조회 1,364
15년 전 조회 1,374
15년 전 조회 1,421
15년 전 조회 1,029
15년 전 조회 1,795