N

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

· 15년 전 · 1665 · 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년 전 조회 703
15년 전 조회 1,966
15년 전 조회 798
15년 전 조회 1,608
15년 전 조회 760
15년 전 조회 772
15년 전 조회 1,435
15년 전 조회 1,055
15년 전 조회 1,338
15년 전 조회 1,651
15년 전 조회 1,285
15년 전 조회 1,382
15년 전 조회 746
15년 전 조회 2,301
15년 전 조회 1,032
15년 전 조회 770
15년 전 조회 1,108
15년 전 조회 818
15년 전 조회 2,069
15년 전 조회 1,111
15년 전 조회 921
15년 전 조회 1,018
15년 전 조회 977
15년 전 조회 991
15년 전 조회 1,060
15년 전 조회 572
15년 전 조회 499
15년 전 조회 468
15년 전 조회 1,170
15년 전 조회 970
15년 전 조회 806
15년 전 조회 809
15년 전 조회 1,210
15년 전 조회 3,223
15년 전 조회 1,084
15년 전 조회 1,894
15년 전 조회 1,153
15년 전 조회 981
15년 전 조회 2,629
15년 전 조회 1,622
15년 전 조회 2,521
15년 전 조회 2,631
15년 전 조회 1,345
15년 전 조회 1,055
15년 전 조회 1,531
15년 전 조회 932
15년 전 조회 1,221
15년 전 조회 1,125
15년 전 조회 1,519
15년 전 조회 1,666
15년 전 조회 926
15년 전 조회 1,343
15년 전 조회 1,132
15년 전 조회 963
15년 전 조회 1,037
15년 전 조회 1,363
15년 전 조회 796
15년 전 조회 979
15년 전 조회 2,629
15년 전 조회 1,445
15년 전 조회 813
15년 전 조회 844
15년 전 조회 1,282
15년 전 조회 1,320
15년 전 조회 1,572
15년 전 조회 1,064
15년 전 조회 1,428
15년 전 조회 723
15년 전 조회 1,066
15년 전 조회 1,327
15년 전 조회 2,737
15년 전 조회 1,103
15년 전 조회 1,084
15년 전 조회 977
15년 전 조회 859
15년 전 조회 873
15년 전 조회 3,461
15년 전 조회 2,833
15년 전 조회 2,007
15년 전 조회 2,455
15년 전 조회 1,541
15년 전 조회 1,092
15년 전 조회 1,092
15년 전 조회 2,370
15년 전 조회 917
15년 전 조회 1,958
15년 전 조회 756
15년 전 조회 1,907
15년 전 조회 841
15년 전 조회 2,514
15년 전 조회 761
15년 전 조회 1,197
15년 전 조회 742
15년 전 조회 2,907
15년 전 조회 1,286
15년 전 조회 1,318
15년 전 조회 1,323
15년 전 조회 1,388
15년 전 조회 996
15년 전 조회 1,753