<select name="in_its" class="input" itemname="과목선택" required>
<?=select_set2("bo_table" ,"is_id", 1, "--과목선택--")?> <!-- 테이블,조회할 필드, 필드에매치값, 기본값-->
</select>
>>>>>>>>>>>>>>>
// 테이블에 필드값 선택하여 값 가져오기 셀렉트박스
function select_set2($bo_table='', $filed1, $type, $msg="" )
{
global $g4, $board;
$sql = " select is_items from $bo_table where $filed1 = '$type' ";
$row = sql_fetch($sql);
$arr = explode("|", $row[is_items]); // 구분자가 , 로 되어 있음
//$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
if ($msg)
$str .= "<option value=''>{$msg}</option>\n";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))
$str .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
return $str;
}
<?=select_set2("bo_table" ,"is_id", 1, "--과목선택--")?> <!-- 테이블,조회할 필드, 필드에매치값, 기본값-->
</select>
>>>>>>>>>>>>>>>
// 테이블에 필드값 선택하여 값 가져오기 셀렉트박스
function select_set2($bo_table='', $filed1, $type, $msg="" )
{
global $g4, $board;
$sql = " select is_items from $bo_table where $filed1 = '$type' ";
$row = sql_fetch($sql);
$arr = explode("|", $row[is_items]); // 구분자가 , 로 되어 있음
//$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
if ($msg)
$str .= "<option value=''>{$msg}</option>\n";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))
$str .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
return $str;
}
댓글 1개
takumi22
12년 전
감사합니다
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5327 |
GINUSSOFT
|
12년 전 | 5107 | |
| 5326 | 12년 전 | 6178 | ||
| 5325 | 12년 전 | 1879 | ||
| 5324 |
|
12년 전 | 1665 | |
| 5323 |
CTOMAN
|
12년 전 | 1939 | |
| 5322 | 12년 전 | 1732 | ||
| 5321 | 12년 전 | 2404 | ||
| 5320 | 12년 전 | 3636 | ||
| 5319 | 12년 전 | 1570 | ||
| 5318 |
프로프리랜서
|
12년 전 | 1319 | |
| 5317 |
프로프리랜서
|
12년 전 | 963 | |
| 5316 |
프로프리랜서
|
12년 전 | 1214 | |
| 5315 |
프로프리랜서
|
12년 전 | 1126 | |
| 5314 |
프로프리랜서
|
12년 전 | 1339 | |
| 5313 |
프로프리랜서
|
12년 전 | 1931 | |
| 5312 |
프로프리랜서
|
12년 전 | 1499 | |
| 5311 |
프로프리랜서
|
12년 전 | 1336 | |
| 5310 |
프로프리랜서
|
12년 전 | 3878 | |
| 5309 |
프로프리랜서
|
12년 전 | 1495 | |
| 5308 | 12년 전 | 1149 | ||
| 5307 | 12년 전 | 5121 | ||
| 5306 | 12년 전 | 2493 | ||
| 5305 |
오늘도망했다
|
12년 전 | 2225 | |
| 5304 |
senseme
|
12년 전 | 3319 | |
| 5303 | 12년 전 | 3596 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기