N

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

· 15년 전 · 1773 · 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년 전 조회 803
15년 전 조회 2,055
15년 전 조회 898
15년 전 조회 1,704
15년 전 조회 853
15년 전 조회 864
15년 전 조회 1,535
15년 전 조회 1,148
15년 전 조회 1,445
15년 전 조회 1,758
15년 전 조회 1,381
15년 전 조회 1,483
15년 전 조회 851
15년 전 조회 2,394
15년 전 조회 1,127
15년 전 조회 862
15년 전 조회 1,210
15년 전 조회 914
15년 전 조회 2,180
15년 전 조회 1,205
15년 전 조회 1,016
15년 전 조회 1,113
15년 전 조회 1,064
15년 전 조회 1,089
15년 전 조회 1,159
15년 전 조회 670
15년 전 조회 599
15년 전 조회 567
15년 전 조회 1,275
15년 전 조회 1,060
15년 전 조회 905
15년 전 조회 897
15년 전 조회 1,298
15년 전 조회 3,322
15년 전 조회 1,183
15년 전 조회 1,986
15년 전 조회 1,246
15년 전 조회 1,074
15년 전 조회 2,732
15년 전 조회 1,723
15년 전 조회 2,622
15년 전 조회 2,741
15년 전 조회 1,464
15년 전 조회 1,164
15년 전 조회 1,621
15년 전 조회 1,037
15년 전 조회 1,323
15년 전 조회 1,215
15년 전 조회 1,626
15년 전 조회 1,774
15년 전 조회 1,026
15년 전 조회 1,448
15년 전 조회 1,242
15년 전 조회 1,069
15년 전 조회 1,132
15년 전 조회 1,462
15년 전 조회 889
15년 전 조회 1,081
15년 전 조회 2,718
15년 전 조회 1,547
15년 전 조회 914
15년 전 조회 938
15년 전 조회 1,382
15년 전 조회 1,414
15년 전 조회 1,683
15년 전 조회 1,163
15년 전 조회 1,551
15년 전 조회 824
15년 전 조회 1,178
15년 전 조회 1,447
15년 전 조회 2,834
15년 전 조회 1,215
15년 전 조회 1,192
15년 전 조회 1,077
15년 전 조회 960
15년 전 조회 972
15년 전 조회 3,576
15년 전 조회 2,941
15년 전 조회 2,118
15년 전 조회 2,558
15년 전 조회 1,659
15년 전 조회 1,200
15년 전 조회 1,199
15년 전 조회 2,477
15년 전 조회 1,018
15년 전 조회 2,058
15년 전 조회 859
15년 전 조회 2,008
15년 전 조회 945
15년 전 조회 2,616
15년 전 조회 870
15년 전 조회 1,292
15년 전 조회 845
15년 전 조회 3,053
15년 전 조회 1,425
15년 전 조회 1,419
15년 전 조회 1,440
15년 전 조회 1,511
15년 전 조회 1,094
15년 전 조회 1,872