N

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

· 15년 전 · 2076 · 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,043
15년 전 조회 2,312
15년 전 조회 1,166
15년 전 조회 1,958
15년 전 조회 1,092
15년 전 조회 1,116
15년 전 조회 1,782
15년 전 조회 1,382
15년 전 조회 1,698
15년 전 조회 1,995
15년 전 조회 1,616
15년 전 조회 1,715
15년 전 조회 1,100
15년 전 조회 2,629
15년 전 조회 1,370
15년 전 조회 1,096
15년 전 조회 1,448
15년 전 조회 1,146
15년 전 조회 2,438
15년 전 조회 1,450
15년 전 조회 1,265
15년 전 조회 1,375
15년 전 조회 1,323
15년 전 조회 1,369
15년 전 조회 1,420
15년 전 조회 926
15년 전 조회 866
15년 전 조회 831
15년 전 조회 1,523
15년 전 조회 1,322
15년 전 조회 1,157
15년 전 조회 1,159
15년 전 조회 1,549
15년 전 조회 3,597
15년 전 조회 1,462
15년 전 조회 2,244
15년 전 조회 1,520
15년 전 조회 1,329
15년 전 조회 3,009
15년 전 조회 1,977
15년 전 조회 2,865
15년 전 조회 2,968
15년 전 조회 1,706
15년 전 조회 1,427
15년 전 조회 1,928
15년 전 조회 1,363
15년 전 조회 1,644
15년 전 조회 1,543
15년 전 조회 1,933
15년 전 조회 2,077
15년 전 조회 1,355
15년 전 조회 1,779
15년 전 조회 1,566
15년 전 조회 1,409
15년 전 조회 1,457
15년 전 조회 1,782
15년 전 조회 1,228
15년 전 조회 1,408
15년 전 조회 3,043
15년 전 조회 1,881
15년 전 조회 1,244
15년 전 조회 1,273
15년 전 조회 1,723
15년 전 조회 1,769
15년 전 조회 2,013
15년 전 조회 1,527
15년 전 조회 1,880
15년 전 조회 1,167
15년 전 조회 1,509
15년 전 조회 1,798
15년 전 조회 3,186
15년 전 조회 1,556
15년 전 조회 1,550
15년 전 조회 1,416
15년 전 조회 1,316
15년 전 조회 1,325
15년 전 조회 3,909
15년 전 조회 3,314
15년 전 조회 2,453
15년 전 조회 2,892
15년 전 조회 1,991
15년 전 조회 1,546
15년 전 조회 1,546
15년 전 조회 2,862
15년 전 조회 1,395
15년 전 조회 2,432
15년 전 조회 1,234
15년 전 조회 2,373
15년 전 조회 1,306
15년 전 조회 2,998
15년 전 조회 1,252
15년 전 조회 1,678
15년 전 조회 1,223
15년 전 조회 3,433
15년 전 조회 1,794
15년 전 조회 1,809
15년 전 조회 1,832
15년 전 조회 1,870
15년 전 조회 1,477
15년 전 조회 2,233