<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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5352 | 11년 전 | 2407 | ||
| 5351 | 11년 전 | 2170 | ||
| 5350 | 11년 전 | 2302 | ||
| 5349 | 11년 전 | 7543 | ||
| 5348 | 11년 전 | 2039 | ||
| 5347 |
bewitched
|
11년 전 | 1762 | |
| 5346 | 11년 전 | 1272 | ||
| 5345 | 11년 전 | 1344 | ||
| 5344 | 11년 전 | 3057 | ||
| 5343 |
프로프리랜서
|
11년 전 | 2340 | |
| 5342 |
프로프리랜서
|
11년 전 | 1914 | |
| 5341 |
프로프리랜서
|
11년 전 | 1752 | |
| 5340 |
프로프리랜서
|
11년 전 | 1812 | |
| 5339 | 11년 전 | 1429 | ||
| 5338 | 11년 전 | 3140 | ||
| 5337 |
프로프리랜서
|
12년 전 | 2236 | |
| 5336 |
프로프리랜서
|
12년 전 | 1692 | |
| 5335 |
프로프리랜서
|
12년 전 | 4028 | |
| 5334 |
프로프리랜서
|
12년 전 | 1325 | |
| 5333 |
프로프리랜서
|
12년 전 | 1780 | |
| 5332 |
차가운바람
|
12년 전 | 1169 | |
| 5331 | 12년 전 | 2847 | ||
| 5330 | 12년 전 | 3651 | ||
| 5329 | 12년 전 | 4529 | ||
| 5328 | 12년 전 | 2571 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기