N

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

· 2010-09-24 (금) 20:56:09 · 3193 · 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>

이런식으로 해보세요.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,187건
+
제목 글쓴이 날짜 조회
10-12-01 조회 2,149
10-12-01 조회 2,097
10-12-01 조회 2,280
10-12-01 조회 1,999
10-12-01 조회 2,128
10-12-01 조회 2,133
10-11-30 조회 2,552
10-11-30 조회 2,015
10-11-30 조회 2,215
10-11-30 조회 2,220
10-11-30 조회 2,728
10-11-30 조회 2,140
10-11-30 조회 2,356
10-11-29 조회 2,955
10-11-29 조회 2,195
10-11-29 조회 2,091
10-11-29 조회 1,890
10-11-29 조회 2,023
10-11-29 조회 1,981
10-11-29 조회 3,403
10-11-29 조회 2,227
10-11-28 조회 2,371
10-11-28 조회 2,164
10-11-28 조회 2,856
10-11-28 조회 2,695
10-11-28 조회 2,329
10-11-27 조회 2,103
10-11-27 조회 2,516
10-11-27 조회 1,967
10-11-27 조회 2,094
10-11-27 조회 2,129
10-11-27 조회 2,070
10-11-27 조회 2,054
10-11-27 조회 2,349
10-11-26 조회 2,146
10-11-26 조회 2,152
10-11-26 조회 2,180
10-11-26 조회 2,265
10-11-26 조회 3,960
10-11-26 조회 2,216
10-11-26 조회 2,083
10-11-26 조회 2,105
10-11-26 조회 2,064
10-11-25 조회 2,285
10-11-25 조회 2,056
10-11-25 조회 2,389
10-11-25 조회 2,113
10-11-25 조회 2,169
10-11-25 조회 2,589
10-11-25 조회 2,043
10-11-25 조회 2,112
10-11-25 조회 2,037
10-11-25 조회 2,265
10-11-25 조회 1,973
10-11-25 조회 2,617
10-11-25 조회 2,213
10-11-24 조회 2,124
10-11-24 조회 2,463
10-11-24 조회 2,108
10-11-24 조회 2,129
10-11-24 조회 2,081
10-11-24 조회 2,192
10-11-24 조회 2,079
10-11-23 조회 2,246
10-11-23 조회 2,159
10-11-23 조회 2,503
10-11-23 조회 2,054
10-11-23 조회 2,166
10-11-23 조회 2,221
10-11-23 조회 2,487
10-11-23 조회 2,990
10-11-23 조회 2,179
10-11-23 조회 2,290
10-11-23 조회 2,300
10-11-23 조회 2,400
10-11-23 조회 2,240
10-11-22 조회 2,466
10-11-22 조회 2,203
10-11-22 조회 2,367
10-11-22 조회 2,196
10-11-22 조회 5,327
10-11-22 조회 8,223
10-11-22 조회 2,318
10-11-22 조회 2,080
10-11-21 조회 2,612
10-11-21 조회 2,317
10-11-20 조회 2,406
10-11-20 조회 2,175
10-11-20 조회 2,085
10-11-19 조회 2,550
10-11-19 조회 2,169
10-11-19 조회 2,897
10-11-18 조회 2,614
10-11-18 조회 2,249
10-11-18 조회 2,221
10-11-18 조회 2,066
10-11-18 조회 2,478
10-11-17 조회 2,197
10-11-17 조회 4,331
10-11-17 조회 2,569