N

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

· 2010-09-24 (금) 20:56:09 · 3142 · 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>

이런식으로 해보세요.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
12-08-29 조회 4,165
12-08-07 조회 3,826
12-08-03 조회 3,643
12-07-31 조회 3,746
12-07-30 조회 3,698
12-07-16 조회 3,895
12-07-15 조회 3,730
12-07-07 조회 3,590
12-07-06 조회 3,800
12-07-03 조회 3,751
12-06-29 조회 3,365
12-06-22 조회 3,737
12-06-17 조회 3,997
12-05-21 조회 3,921
12-05-02 조회 3,445
12-05-02 조회 4,241
12-05-02 조회 3,362
12-04-30 조회 3,560
12-04-30 조회 3,240
12-03-17 조회 4,103
12-03-10 조회 3,436
12-03-08 조회 3,959
12-03-03 조회 3,675
12-02-27 조회 5,089
12-02-17 조회 4,386
12-02-16 조회 4,667
12-02-03 조회 3,333
12-01-31 조회 3,241
12-01-24 조회 3,241
12-01-17 조회 3,942
12-01-05 조회 3,489
11-12-30 조회 3,220
11-12-23 조회 4,776
11-12-08 조회 3,537
11-12-07 조회 4,503
11-11-27 조회 3,924
11-11-25 조회 4,253
11-11-23 조회 3,703
11-11-22 조회 3,559
11-11-09 조회 3,267
11-10-23 조회 3,206
11-10-19 조회 3,158
11-10-08 조회 2,842
11-10-04 조회 2,843
11-10-04 조회 5,304
11-09-01 조회 4,375
11-08-13 조회 2,559
11-08-06 조회 3,238
11-07-11 조회 3,635
11-06-27 조회 2,993
11-06-21 조회 2,657
11-06-13 조회 2,467
11-06-07 조회 2,477
11-05-26 조회 2,434
11-04-20 조회 2,760
11-03-21 조회 2,863
11-03-18 조회 2,555
11-03-11 조회 2,572
11-02-07 조회 2,401
11-01-18 조회 2,722
11-01-12 조회 2,442
11-01-06 조회 2,533
10-12-10 조회 2,797
10-12-09 조회 2,651
10-12-08 조회 5,080
10-11-29 조회 2,910
10-11-28 조회 2,822
10-11-28 조회 2,656
10-11-19 조회 2,846
10-11-04 조회 2,718
10-10-21 조회 2,443
10-10-19 조회 3,403
10-10-12 조회 2,730
10-10-07 조회 2,555
10-09-30 조회 3,517
10-09-17 조회 3,930
10-09-17 조회 3,873
10-05-31 조회 3,583
09-12-31 조회 3,714
09-07-23 조회 5,042
08-09-16 조회 3,246
08-09-06 조회 2,987
08-09-04 조회 3,408
08-08-16 조회 4,439
08-08-15 조회 3,308
08-08-14 조회 4,525
08-08-12 조회 3,992
08-07-23 조회 2,810
08-07-10 조회 3,761
08-07-04 조회 2,986
08-06-27 조회 7,627
08-06-19 조회 4,938
08-05-27 조회 5,541
08-05-25 조회 5,375
08-05-23 조회 3,449
08-05-23 조회 4,618
08-05-21 조회 4,968
08-05-20 조회 4,083
08-05-20 조회 3,310
08-04-18 조회 4,379