글 수정시 콤보박스 입력값 보이게 도와주세요.. 정보
글 수정시 콤보박스 입력값 보이게 도와주세요..본문
안녕하세요..
글 수정시 콤보박스에 있는 값들이 나오지가 않네요..
검색을 해도 나오지 않고...
option value에 write(wr_1)값을 넣어줘도 수정시 이전값들이 나오지 않네요..
고수님들께서 무지한 저에게 도움의 손길을 주세요 ㅠㅠ
===========write.skin.php=======================
<td width="10%" class=write_head>항목</td>
<? $g4_combo_category .= "<option value='항목1'>항목1</option>\n";
$g4_combo_category .= "<option value='항목2'>항목2</option>\n";
?>
<td width="10%"><select name=wr_1 itemname="항목"><option value="">== 선택하세요 ==<?=$g4_combo_category?></select></td>
이렇고요..
========== write.php ======================
if ($w == "")
$content = $board[bo_insert_content];
else if ($w == "r") {
//if (!$write[wr_html]) {
if (!strstr($write[wr_option], "html")) {
$content = "\n\n\n>"
//. "\n> $write[wr_datetime], \"$write[wr_name]\"님이 쓰신 글입니다. ↓"
. "\n>"
. "\n> " . preg_replace("/\n/", "\n> ", get_text($write[wr_content], 0))
. "\n>"
. "\n";
}
} else
$content = get_text($write[wr_content], 0);
$wr_subject = get_text($write[wr_subject], 0);
$wr_1 = get_text($write[wr_1], 0);
write.php에 wr_1값을 불러들이는 것까진 맞는거 같은데요,,
라디오박스나 input박스에 적용하면 수정시 저장된 값을 불러오는데,
콤보박스에만 유독 값이 사라져서 나오네요..
제발 도와주세요 ㅠㅠ
글 수정시 콤보박스에 있는 값들이 나오지가 않네요..
검색을 해도 나오지 않고...
option value에 write(wr_1)값을 넣어줘도 수정시 이전값들이 나오지 않네요..
고수님들께서 무지한 저에게 도움의 손길을 주세요 ㅠㅠ
===========write.skin.php=======================
<td width="10%" class=write_head>항목</td>
<? $g4_combo_category .= "<option value='항목1'>항목1</option>\n";
$g4_combo_category .= "<option value='항목2'>항목2</option>\n";
?>
<td width="10%"><select name=wr_1 itemname="항목"><option value="">== 선택하세요 ==<?=$g4_combo_category?></select></td>
이렇고요..
========== write.php ======================
if ($w == "")
$content = $board[bo_insert_content];
else if ($w == "r") {
//if (!$write[wr_html]) {
if (!strstr($write[wr_option], "html")) {
$content = "\n\n\n>"
//. "\n> $write[wr_datetime], \"$write[wr_name]\"님이 쓰신 글입니다. ↓"
. "\n>"
. "\n> " . preg_replace("/\n/", "\n> ", get_text($write[wr_content], 0))
. "\n>"
. "\n";
}
} else
$content = get_text($write[wr_content], 0);
$wr_subject = get_text($write[wr_subject], 0);
$wr_1 = get_text($write[wr_1], 0);
write.php에 wr_1값을 불러들이는 것까진 맞는거 같은데요,,
라디오박스나 input박스에 적용하면 수정시 저장된 값을 불러오는데,
콤보박스에만 유독 값이 사라져서 나오네요..
제발 도와주세요 ㅠㅠ
댓글 전체

if구문 추가하셔서 option쪽에 $write[wr_1] 값이 있을때 checked 넣어 주시면 될듯 하네요..