COMING SOON 🚀

N

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

· 15년 전 · 2044 · 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년 전 조회 1,008
15년 전 조회 2,279
15년 전 조회 1,132
15년 전 조회 1,926
15년 전 조회 1,062
15년 전 조회 1,088
15년 전 조회 1,741
15년 전 조회 1,346
15년 전 조회 1,657
15년 전 조회 1,968
15년 전 조회 1,586
15년 전 조회 1,679
15년 전 조회 1,068
15년 전 조회 2,592
15년 전 조회 1,335
15년 전 조회 1,066
15년 전 조회 1,419
15년 전 조회 1,124
15년 전 조회 2,393
15년 전 조회 1,425
15년 전 조회 1,244
15년 전 조회 1,341
15년 전 조회 1,296
15년 전 조회 1,325
15년 전 조회 1,388
15년 전 조회 894
15년 전 조회 827
15년 전 조회 800
15년 전 조회 1,496
15년 전 조회 1,286
15년 전 조회 1,124
15년 전 조회 1,131
15년 전 조회 1,517
15년 전 조회 3,558
15년 전 조회 1,422
15년 전 조회 2,211
15년 전 조회 1,478
15년 전 조회 1,295
15년 전 조회 2,984
15년 전 조회 1,940
15년 전 조회 2,839
15년 전 조회 2,944
15년 전 조회 1,685
15년 전 조회 1,388
15년 전 조회 1,905
15년 전 조회 1,323
15년 전 조회 1,608
15년 전 조회 1,497
15년 전 조회 1,904
15년 전 조회 2,045
15년 전 조회 1,318
15년 전 조회 1,740
15년 전 조회 1,538
15년 전 조회 1,379
15년 전 조회 1,420
15년 전 조회 1,749
15년 전 조회 1,183
15년 전 조회 1,370
15년 전 조회 3,007
15년 전 조회 1,836
15년 전 조회 1,202
15년 전 조회 1,234
15년 전 조회 1,686
15년 전 조회 1,732
15년 전 조회 1,966
15년 전 조회 1,480
15년 전 조회 1,848
15년 전 조회 1,119
15년 전 조회 1,466
15년 전 조회 1,756
15년 전 조회 3,132
15년 전 조회 1,507
15년 전 조회 1,507
15년 전 조회 1,363
15년 전 조회 1,266
15년 전 조회 1,271
15년 전 조회 3,870
15년 전 조회 3,267
15년 전 조회 2,409
15년 전 조회 2,852
15년 전 조회 1,953
15년 전 조회 1,506
15년 전 조회 1,499
15년 전 조회 2,815
15년 전 조회 1,343
15년 전 조회 2,394
15년 전 조회 1,180
15년 전 조회 2,335
15년 전 조회 1,271
15년 전 조회 2,948
15년 전 조회 1,209
15년 전 조회 1,643
15년 전 조회 1,177
15년 전 조회 3,386
15년 전 조회 1,759
15년 전 조회 1,762
15년 전 조회 1,788
15년 전 조회 1,839
15년 전 조회 1,428
15년 전 조회 2,189