N

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

· 15년 전 · 1847 · 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년 전 조회 843
15년 전 조회 2,098
15년 전 조회 942
15년 전 조회 1,754
15년 전 조회 898
15년 전 조회 900
15년 전 조회 1,570
15년 전 조회 1,186
15년 전 조회 1,481
15년 전 조회 1,799
15년 전 조회 1,420
15년 전 조회 1,519
15년 전 조회 892
15년 전 조회 2,438
15년 전 조회 1,164
15년 전 조회 903
15년 전 조회 1,250
15년 전 조회 961
15년 전 조회 2,211
15년 전 조회 1,250
15년 전 조회 1,059
15년 전 조회 1,152
15년 전 조회 1,117
15년 전 조회 1,140
15년 전 조회 1,198
15년 전 조회 714
15년 전 조회 648
15년 전 조회 619
15년 전 조회 1,314
15년 전 조회 1,119
15년 전 조회 960
15년 전 조회 951
15년 전 조회 1,347
15년 전 조회 3,377
15년 전 조회 1,238
15년 전 조회 2,044
15년 전 조회 1,291
15년 전 조회 1,126
15년 전 조회 2,789
15년 전 조회 1,766
15년 전 조회 2,661
15년 전 조회 2,782
15년 전 조회 1,514
15년 전 조회 1,198
15년 전 조회 1,688
15년 전 조회 1,096
15년 전 조회 1,386
15년 전 조회 1,284
15년 전 조회 1,689
15년 전 조회 1,848
15년 전 조회 1,087
15년 전 조회 1,520
15년 전 조회 1,316
15년 전 조회 1,141
15년 전 조회 1,191
15년 전 조회 1,533
15년 전 조회 950
15년 전 조회 1,148
15년 전 조회 2,779
15년 전 조회 1,608
15년 전 조회 992
15년 전 조회 1,002
15년 전 조회 1,455
15년 전 조회 1,486
15년 전 조회 1,742
15년 전 조회 1,235
15년 전 조회 1,622
15년 전 조회 887
15년 전 조회 1,246
15년 전 조회 1,516
15년 전 조회 2,890
15년 전 조회 1,285
15년 전 조회 1,268
15년 전 조회 1,142
15년 전 조회 1,038
15년 전 조회 1,041
15년 전 조회 3,643
15년 전 조회 3,019
15년 전 조회 2,190
15년 전 조회 2,622
15년 전 조회 1,736
15년 전 조회 1,271
15년 전 조회 1,252
15년 전 조회 2,539
15년 전 조회 1,087
15년 전 조회 2,138
15년 전 조회 933
15년 전 조회 2,089
15년 전 조회 1,022
15년 전 조회 2,695
15년 전 조회 937
15년 전 조회 1,384
15년 전 조회 926
15년 전 조회 3,150
15년 전 조회 1,505
15년 전 조회 1,502
15년 전 조회 1,529
15년 전 조회 1,598
15년 전 조회 1,177
15년 전 조회 1,947