N

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

· 15년 전 · 1657 · 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년 전 조회 695
15년 전 조회 1,952
15년 전 조회 785
15년 전 조회 1,594
15년 전 조회 749
15년 전 조회 757
15년 전 조회 1,423
15년 전 조회 1,044
15년 전 조회 1,328
15년 전 조회 1,639
15년 전 조회 1,273
15년 전 조회 1,371
15년 전 조회 729
15년 전 조회 2,286
15년 전 조회 1,020
15년 전 조회 758
15년 전 조회 1,098
15년 전 조회 804
15년 전 조회 2,061
15년 전 조회 1,095
15년 전 조회 912
15년 전 조회 1,012
15년 전 조회 963
15년 전 조회 974
15년 전 조회 1,046
15년 전 조회 561
15년 전 조회 488
15년 전 조회 458
15년 전 조회 1,157
15년 전 조회 957
15년 전 조회 800
15년 전 조회 798
15년 전 조회 1,199
15년 전 조회 3,210
15년 전 조회 1,076
15년 전 조회 1,887
15년 전 조회 1,142
15년 전 조회 967
15년 전 조회 2,612
15년 전 조회 1,608
15년 전 조회 2,508
15년 전 조회 2,620
15년 전 조회 1,339
15년 전 조회 1,045
15년 전 조회 1,519
15년 전 조회 921
15년 전 조회 1,211
15년 전 조회 1,112
15년 전 조회 1,508
15년 전 조회 1,658
15년 전 조회 920
15년 전 조회 1,335
15년 전 조회 1,125
15년 전 조회 956
15년 전 조회 1,026
15년 전 조회 1,351
15년 전 조회 783
15년 전 조회 967
15년 전 조회 2,621
15년 전 조회 1,438
15년 전 조회 801
15년 전 조회 834
15년 전 조회 1,276
15년 전 조회 1,310
15년 전 조회 1,563
15년 전 조회 1,052
15년 전 조회 1,419
15년 전 조회 716
15년 전 조회 1,060
15년 전 조회 1,321
15년 전 조회 2,730
15년 전 조회 1,092
15년 전 조회 1,071
15년 전 조회 973
15년 전 조회 849
15년 전 조회 860
15년 전 조회 3,450
15년 전 조회 2,820
15년 전 조회 1,998
15년 전 조회 2,446
15년 전 조회 1,535
15년 전 조회 1,084
15년 전 조회 1,079
15년 전 조회 2,362
15년 전 조회 905
15년 전 조회 1,947
15년 전 조회 744
15년 전 조회 1,895
15년 전 조회 833
15년 전 조회 2,502
15년 전 조회 754
15년 전 조회 1,184
15년 전 조회 731
15년 전 조회 2,903
15년 전 조회 1,277
15년 전 조회 1,307
15년 전 조회 1,318
15년 전 조회 1,380
15년 전 조회 988
15년 전 조회 1,750