N

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

· 15년 전 · 2158 · 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,112
15년 전 조회 2,398
15년 전 조회 1,238
15년 전 조회 2,034
15년 전 조회 1,168
15년 전 조회 1,185
15년 전 조회 1,855
15년 전 조회 1,455
15년 전 조회 1,780
15년 전 조회 2,081
15년 전 조회 1,701
15년 전 조회 1,804
15년 전 조회 1,180
15년 전 조회 2,728
15년 전 조회 1,440
15년 전 조회 1,176
15년 전 조회 1,530
15년 전 조회 1,230
15년 전 조회 2,513
15년 전 조회 1,524
15년 전 조회 1,352
15년 전 조회 1,451
15년 전 조회 1,408
15년 전 조회 1,451
15년 전 조회 1,495
15년 전 조회 991
15년 전 조회 941
15년 전 조회 912
15년 전 조회 1,601
15년 전 조회 1,397
15년 전 조회 1,234
15년 전 조회 1,231
15년 전 조회 1,628
15년 전 조회 3,678
15년 전 조회 1,533
15년 전 조회 2,321
15년 전 조회 1,604
15년 전 조회 1,410
15년 전 조회 3,087
15년 전 조회 2,052
15년 전 조회 2,947
15년 전 조회 3,054
15년 전 조회 1,796
15년 전 조회 1,509
15년 전 조회 1,998
15년 전 조회 1,444
15년 전 조회 1,718
15년 전 조회 1,618
15년 전 조회 2,007
15년 전 조회 2,159
15년 전 조회 1,425
15년 전 조회 1,852
15년 전 조회 1,641
15년 전 조회 1,473
15년 전 조회 1,534
15년 전 조회 1,852
15년 전 조회 1,293
15년 전 조회 1,484
15년 전 조회 3,122
15년 전 조회 1,950
15년 전 조회 1,309
15년 전 조회 1,342
15년 전 조회 1,795
15년 전 조회 1,845
15년 전 조회 2,098
15년 전 조회 1,599
15년 전 조회 1,949
15년 전 조회 1,237
15년 전 조회 1,585
15년 전 조회 1,882
15년 전 조회 3,266
15년 전 조회 1,633
15년 전 조회 1,620
15년 전 조회 1,498
15년 전 조회 1,380
15년 전 조회 1,395
15년 전 조회 3,981
15년 전 조회 3,385
15년 전 조회 2,532
15년 전 조회 2,976
15년 전 조회 2,085
15년 전 조회 1,622
15년 전 조회 1,624
15년 전 조회 2,951
15년 전 조회 1,464
15년 전 조회 2,514
15년 전 조회 1,309
15년 전 조회 2,447
15년 전 조회 1,386
15년 전 조회 3,069
15년 전 조회 1,319
15년 전 조회 1,767
15년 전 조회 1,305
15년 전 조회 3,512
15년 전 조회 1,873
15년 전 조회 1,895
15년 전 조회 1,906
15년 전 조회 1,964
15년 전 조회 1,559
15년 전 조회 2,318