N

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

· 15년 전 · 1802 · 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년 전 조회 821
15년 전 조회 2,072
15년 전 조회 921
15년 전 조회 1,726
15년 전 조회 878
15년 전 조회 879
15년 전 조회 1,551
15년 전 조회 1,164
15년 전 조회 1,460
15년 전 조회 1,782
15년 전 조회 1,401
15년 전 조회 1,504
15년 전 조회 861
15년 전 조회 2,412
15년 전 조회 1,147
15년 전 조회 881
15년 전 조회 1,227
15년 전 조회 934
15년 전 조회 2,197
15년 전 조회 1,223
15년 전 조회 1,030
15년 전 조회 1,132
15년 전 조회 1,089
15년 전 조회 1,114
15년 전 조회 1,174
15년 전 조회 689
15년 전 조회 618
15년 전 조회 583
15년 전 조회 1,292
15년 전 조회 1,085
15년 전 조회 930
15년 전 조회 924
15년 전 조회 1,317
15년 전 조회 3,343
15년 전 조회 1,206
15년 전 조회 2,016
15년 전 조회 1,261
15년 전 조회 1,097
15년 전 조회 2,756
15년 전 조회 1,744
15년 전 조회 2,638
15년 전 조회 2,754
15년 전 조회 1,493
15년 전 조회 1,179
15년 전 조회 1,646
15년 전 조회 1,060
15년 전 조회 1,348
15년 전 조회 1,240
15년 전 조회 1,648
15년 전 조회 1,803
15년 전 조회 1,050
15년 전 조회 1,477
15년 전 조회 1,270
15년 전 조회 1,096
15년 전 조회 1,152
15년 전 조회 1,488
15년 전 조회 912
15년 전 조회 1,104
15년 전 조회 2,745
15년 전 조회 1,572
15년 전 조회 949
15년 전 조회 960
15년 전 조회 1,406
15년 전 조회 1,442
15년 전 조회 1,710
15년 전 조회 1,186
15년 전 조회 1,580
15년 전 조회 844
15년 전 조회 1,208
15년 전 조회 1,482
15년 전 조회 2,862
15년 전 조회 1,242
15년 전 조회 1,227
15년 전 조회 1,105
15년 전 조회 983
15년 전 조회 996
15년 전 조회 3,598
15년 전 조회 2,966
15년 전 조회 2,143
15년 전 조회 2,579
15년 전 조회 1,691
15년 전 조회 1,227
15년 전 조회 1,216
15년 전 조회 2,502
15년 전 조회 1,040
15년 전 조회 2,085
15년 전 조회 886
15년 전 조회 2,034
15년 전 조회 972
15년 전 조회 2,638
15년 전 조회 894
15년 전 조회 1,319
15년 전 조회 873
15년 전 조회 3,101
15년 전 조회 1,457
15년 전 조회 1,444
15년 전 조회 1,475
15년 전 조회 1,537
15년 전 조회 1,129
15년 전 조회 1,899