N

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

· 15년 전 · 1886 · 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년 전 조회 872
15년 전 조회 2,124
15년 전 조회 981
15년 전 조회 1,790
15년 전 조회 921
15년 전 조회 931
15년 전 조회 1,595
15년 전 조회 1,209
15년 전 조회 1,511
15년 전 조회 1,826
15년 전 조회 1,450
15년 전 조회 1,546
15년 전 조회 925
15년 전 조회 2,467
15년 전 조회 1,203
15년 전 조회 925
15년 전 조회 1,282
15년 전 조회 988
15년 전 조회 2,238
15년 전 조회 1,279
15년 전 조회 1,092
15년 전 조회 1,178
15년 전 조회 1,148
15년 전 조회 1,173
15년 전 조회 1,232
15년 전 조회 745
15년 전 조회 678
15년 전 조회 652
15년 전 조회 1,342
15년 전 조회 1,144
15년 전 조회 986
15년 전 조회 979
15년 전 조회 1,380
15년 전 조회 3,409
15년 전 조회 1,278
15년 전 조회 2,072
15년 전 조회 1,320
15년 전 조회 1,159
15년 전 조회 2,821
15년 전 조회 1,794
15년 전 조회 2,690
15년 전 조회 2,814
15년 전 조회 1,544
15년 전 조회 1,234
15년 전 조회 1,727
15년 전 조회 1,141
15년 전 조회 1,438
15년 전 조회 1,322
15년 전 조회 1,729
15년 전 조회 1,887
15년 전 조회 1,136
15년 전 조회 1,561
15년 전 조회 1,356
15년 전 조회 1,177
15년 전 조회 1,237
15년 전 조회 1,573
15년 전 조회 999
15년 전 조회 1,185
15년 전 조회 2,821
15년 전 조회 1,651
15년 전 조회 1,021
15년 전 조회 1,049
15년 전 조회 1,498
15년 전 조회 1,530
15년 전 조회 1,789
15년 전 조회 1,286
15년 전 조회 1,655
15년 전 조회 928
15년 전 조회 1,289
15년 전 조회 1,567
15년 전 조회 2,933
15년 전 조회 1,333
15년 전 조회 1,313
15년 전 조회 1,177
15년 전 조회 1,083
15년 전 조회 1,084
15년 전 조회 3,685
15년 전 조회 3,068
15년 전 조회 2,231
15년 전 조회 2,671
15년 전 조회 1,772
15년 전 조회 1,314
15년 전 조회 1,303
15년 전 조회 2,606
15년 전 조회 1,135
15년 전 조회 2,187
15년 전 조회 977
15년 전 조회 2,138
15년 전 조회 1,074
15년 전 조회 2,745
15년 전 조회 996
15년 전 조회 1,421
15년 전 조회 975
15년 전 조회 3,217
15년 전 조회 1,552
15년 전 조회 1,561
15년 전 조회 1,585
15년 전 조회 1,646
15년 전 조회 1,234
15년 전 조회 1,996