묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
이 소스좀 정확하고 최적화좀 부탁드립니다..ㅡ.ㅜ
2002.04.30 11:19
<? // search_end.php3 중 시작부분..
////////////////////////////////////////////////////////////////////// 검색 시작일 시작
$start_year = 1009810800 + 31536000*($start_year-2002);
// 이부분은 steelheart님께서 도와주셨거든요..^^;;
// 헌데 년도식은 그런대로 해결된듯한데 달수랑 일수를 어케 처리해야될지 몰라 아래처럼 노가다했습니다..ㅡ_ㅡ;; 도움을주세요..
// 검색도 정확하지가 않구요.. 제가원한건 2002년 2월 5일부터 2002년 2월 10일까지 지정해서 검색하면
// 정확하게 그 안에 있는 데이터의 수를 뽑아오고 싶거든요..
// 지금꺼로 하면 실제 데이터보다 1개의 수가 더 많이 뽑혀나오더라구요.. 왜그런건지..
// 초보가 부탁드립니다..ㅜ.ㅜ
/*
if($start_year=="2002") $start_year=1009810800;
elseif($start_year=="2003") $start_year=1041346800;
elseif($start_year=="2004") $start_year=1041346800+(31536000*1);
elseif($start_year=="2005") $start_year=1041346800+(31536000*2);
elseif($start_year=="2006") $start_year=1041346800+(31536000*3);
elseif($start_year=="2007") $start_year=1041346800+(31536000*4);
elseif($start_year=="2008") $start_year=1041346800+(31536000*5);
elseif($start_year=="2009") $start_year=1041346800+(31536000*6);
elseif($start_year=="2010") $start_year=1041346800+(31536000*7);
elseif($start_year=="2011") $start_year=1041346800+(31536000*8);
elseif($start_year=="2012") $start_year=1041346800+(31536000*9);
elseif($start_year=="2013") $start_year=1041346800+(31536000*10);
elseif($start_year=="2014") $start_year=1041346800+(31536000*11);
elseif($start_year=="2015") $start_year=1041346800+(31536000*12);
elseif($start_year=="2016") $start_year=1041346800+(31536000*13);
elseif($start_year=="2017") $start_year=1041346800+(31536000*14);
elseif($start_year=="2018") $start_year=1041346800+(31536000*15);
elseif($start_year=="2019") $start_year=1041346800+(31536000*16);
elseif($start_year=="2020") $start_year=1041346800+(31536000*17);
elseif($start_year=="2021") $start_year=1041346800+(31536000*18);
elseif($start_year=="2022") $start_year=1041346800+(31536000*19);
elseif($start_year=="2023") $start_year=1041346800+(31536000*20);
elseif($start_year=="2024") $start_year=1041346800+(31536000*21);
elseif($start_year=="2025") $start_year=1041346800+(31536000*22);
*/
if($start_mon=="1") $start_mon="";
elseif($start_mon=="2") $start_mon=2678400;
elseif($start_mon=="3") $start_mon=2678400+2419200;
elseif($start_mon=="4") $start_mon=2678400+2419200+2678400;
elseif($start_mon=="5") $start_mon=2678400+2419200+2678400+2592000;
elseif($start_mon=="6") $start_mon=2678400+2419200+2678400+2592000+2678400;
elseif($start_mon=="7") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000;
elseif($start_mon=="8") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400;
elseif($start_mon=="9") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400;
elseif($start_mon=="10") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000;
elseif($start_mon=="11") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000+2678400;
elseif($start_mon=="12") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000+2678400+2592000;
if($start_day=="1") $start_day='';
elseif($start_day=="2") $start_day=86400;
elseif($start_day=="3") $start_day=86400+(86400*1);
elseif($start_day=="4") $start_day=86400+(86400*2);
elseif($start_day=="5") $start_day=86400+(86400*3);
elseif($start_day=="6") $start_day=86400+(86400*4);
elseif($start_day=="7") $start_day=86400+(86400*5);
elseif($start_day=="8") $start_day=86400+(86400*6);
elseif($start_day=="9") $start_day=86400+(86400*7);
elseif($start_day=="10") $start_day=86400+(86400*8);
elseif($start_day=="11") $start_day=86400+(86400*9);
elseif($start_day=="12") $start_day=86400+(86400*10);
elseif($start_day=="13") $start_day=86400+(86400*11);
elseif($start_day=="14") $start_day=86400+(86400*12);
elseif($start_day=="15") $start_day=86400+(86400*13);
elseif($start_day=="16") $start_day=86400+(86400*14);
elseif($start_day=="17") $start_day=86400+(86400*15);
elseif($start_day=="18") $start_day=86400+(86400*16);
elseif($start_day=="19") $start_day=86400+(86400*17);
elseif($start_day=="20") $start_day=86400+(86400*18);
elseif($start_day=="21") $start_day=86400+(86400*19);
elseif($start_day=="22") $start_day=86400+(86400*20);
elseif($start_day=="23") $start_day=86400+(86400*21);
elseif($start_day=="24") $start_day=86400+(86400*22);
elseif($start_day=="25") $start_day=86400+(86400*23);
elseif($start_day=="26") $start_day=86400+(86400*24);
elseif($start_day=="27") $start_day=86400+(86400*25);
elseif($start_day=="28") $start_day=86400+(86400*26);
elseif($start_day=="29") $start_day=86400+(86400*27);
elseif($start_day=="30") $start_day=86400+(86400*28);
elseif($start_day=="31") $start_day=86400+(86400*29);
////////////////////////////////////////////////////////////////////// 검색 시작일 끝
////////////////////////////////////////////////////////////////////// 검색 마감일 시작
if($end_year=="2002") $end_year=1009810800;
elseif($end_year=="2003") $end_year=1041346800;
elseif($end_year=="2004") $end_year=1041346800+(31536000*1);
elseif($end_year=="2005") $end_year=1041346800+(31536000*2);
elseif($end_year=="2006") $end_year=1041346800+(31536000*3);
elseif($end_year=="2007") $end_year=1041346800+(31536000*4);
elseif($end_year=="2008") $end_year=1041346800+(31536000*5);
elseif($end_year=="2009") $end_year=1041346800+(31536000*6);
elseif($end_year=="2010") $end_year=1041346800+(31536000*7);
elseif($end_year=="2011") $end_year=1041346800+(31536000*8);
elseif($end_year=="2012") $end_year=1041346800+(31536000*9);
elseif($end_year=="2013") $end_year=1041346800+(31536000*10);
elseif($end_year=="2014") $end_year=1041346800+(31536000*11);
elseif($end_year=="2015") $end_year=1041346800+(31536000*12);
elseif($end_year=="2016") $end_year=1041346800+(31536000*13);
elseif($end_year=="2017") $end_year=1041346800+(31536000*14);
elseif($end_year=="2018") $end_year=1041346800+(31536000*15);
elseif($end_year=="2019") $end_year=1041346800+(31536000*16);
elseif($end_year=="2020") $end_year=1041346800+(31536000*17);
elseif($end_year=="2021") $end_year=1041346800+(31536000*18);
elseif($end_year=="2022") $end_year=1041346800+(31536000*19);
elseif($end_year=="2023") $end_year=1041346800+(31536000*20);
elseif($end_year=="2024") $end_year=1041346800+(31536000*21);
elseif($end_year=="2025") $end_year=1041346800+(31536000*22);
if($end_mon=="1") $end_mon="";
elseif($end_mon=="2") $end_mon=2678400;
elseif($end_mon=="3") $end_mon=2678400+2419200;
elseif($end_mon=="4") $end_mon=2678400+2419200+2678400;
elseif($end_mon=="5") $end_mon=2678400+2419200+2678400+2592000;
elseif($end_mon=="6") $end_mon=2678400+2419200+2678400+2592000+2678400;
elseif($end_mon=="7") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000;
elseif($end_mon=="8") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400;
elseif($end_mon=="9") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400;
elseif($end_mon=="10") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000;
elseif($end_mon=="11") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000+2678400;
elseif($end_mon=="12") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000+2678400+2592000;
if($end_day=="1") $end_day='';
elseif($end_day=="2") $end_day=86400;
elseif($end_day=="3") $end_day=86400+(86400*1);
elseif($end_day=="4") $end_day=86400+(86400*2);
elseif($end_day=="5") $end_day=86400+(86400*3);
elseif($end_day=="6") $end_day=86400+(86400*4);
elseif($end_day=="7") $end_day=86400+(86400*5);
elseif($end_day=="8") $end_day=86400+(86400*6);
elseif($end_day=="9") $end_day=86400+(86400*7);
elseif($end_day=="10") $end_day=86400+(86400*8);
elseif($end_day=="11") $end_day=86400+(86400*9);
elseif($end_day=="12") $end_day=86400+(86400*10);
elseif($end_day=="13") $end_day=86400+(86400*11);
elseif($end_day=="14") $end_day=86400+(86400*12);
elseif($end_day=="15") $end_day=86400+(86400*13);
elseif($end_day=="16") $end_day=86400+(86400*14);
elseif($end_day=="17") $end_day=86400+(86400*15);
elseif($end_day=="18") $end_day=86400+(86400*16);
elseif($end_day=="19") $end_day=86400+(86400*17);
elseif($end_day=="20") $end_day=86400+(86400*18);
elseif($end_day=="21") $end_day=86400+(86400*19);
elseif($end_day=="22") $end_day=86400+(86400*20);
elseif($end_day=="23") $end_day=86400+(86400*21);
elseif($end_day=="24") $end_day=86400+(86400*22);
elseif($end_day=="25") $end_day=86400+(86400*23);
elseif($end_day=="26") $end_day=86400+(86400*24);
elseif($end_day=="27") $end_day=86400+(86400*25);
elseif($end_day=="28") $end_day=86400+(86400*26);
elseif($end_day=="29") $end_day=86400+(86400*27);
elseif($end_day=="30") $end_day=86400+(86400*28);
elseif($end_day=="31") $end_day=86400+(86400*29);
////////////////////////////////////////////////////////////////////// 검색마감일 끝
$start_date = $start_year+$start_mon+$start_day;
$end_date = $end_year+$end_mon+$end_day;
// $start_date 와 $end_date로 DB에서 데이터를 뽑아오는데요..
// 값이 정확치가 않아요..ㅡ.ㅜ 2월달도 끼고. 그리고 검색하는 페이지에서 셀렉트박스로 하잖아요..
// 그부분도 어케 해야할지 몰르겠어요.. 전 일케 했거든요?
?>
///////////////////////////// start_search.php3
<table border=0 cellspacing=0 cellpadding=0 width=150 bgcolor=#FFCC00 align=center>
<form name=search action="search_end.php3" method=post>
<tr>
<td bgcolor=6F9FBF align=center height=20>
<font size=2 face=돋움><b>기간별 발주량 검색</b></font></td>
</tr>
<tr>
<td>
<font size=2 face=돋움>검색시작일<br>
<select name="start_year" size=1>
<?
for ($i=2002; $i <= 2025; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select name="start_mon" size="1">
<?
for ($i=1; $i <= 12; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="start_day">
<?
for ($i=1; $i <= 31; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select><br>
검색종료일<br>
<select name="end_year" size=1>
<?
for ($i=2002; $i <= 2025; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="end_mon">
<?
for ($i=1; $i <= 12; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="end_day">
<?
for ($i=1; $i <= 31; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<br>
<center><INPUT TYPE="submit" value="검색하기"></center>
</td>
</tr>
</form>
</table>
제가 어케 할려는지 아시겠죠?ㅡ.ㅜ 도와주세요..
제가 php의 정말 초보인지라..
////////////////////////////////////////////////////////////////////// 검색 시작일 시작
$start_year = 1009810800 + 31536000*($start_year-2002);
// 이부분은 steelheart님께서 도와주셨거든요..^^;;
// 헌데 년도식은 그런대로 해결된듯한데 달수랑 일수를 어케 처리해야될지 몰라 아래처럼 노가다했습니다..ㅡ_ㅡ;; 도움을주세요..
// 검색도 정확하지가 않구요.. 제가원한건 2002년 2월 5일부터 2002년 2월 10일까지 지정해서 검색하면
// 정확하게 그 안에 있는 데이터의 수를 뽑아오고 싶거든요..
// 지금꺼로 하면 실제 데이터보다 1개의 수가 더 많이 뽑혀나오더라구요.. 왜그런건지..
// 초보가 부탁드립니다..ㅜ.ㅜ
/*
if($start_year=="2002") $start_year=1009810800;
elseif($start_year=="2003") $start_year=1041346800;
elseif($start_year=="2004") $start_year=1041346800+(31536000*1);
elseif($start_year=="2005") $start_year=1041346800+(31536000*2);
elseif($start_year=="2006") $start_year=1041346800+(31536000*3);
elseif($start_year=="2007") $start_year=1041346800+(31536000*4);
elseif($start_year=="2008") $start_year=1041346800+(31536000*5);
elseif($start_year=="2009") $start_year=1041346800+(31536000*6);
elseif($start_year=="2010") $start_year=1041346800+(31536000*7);
elseif($start_year=="2011") $start_year=1041346800+(31536000*8);
elseif($start_year=="2012") $start_year=1041346800+(31536000*9);
elseif($start_year=="2013") $start_year=1041346800+(31536000*10);
elseif($start_year=="2014") $start_year=1041346800+(31536000*11);
elseif($start_year=="2015") $start_year=1041346800+(31536000*12);
elseif($start_year=="2016") $start_year=1041346800+(31536000*13);
elseif($start_year=="2017") $start_year=1041346800+(31536000*14);
elseif($start_year=="2018") $start_year=1041346800+(31536000*15);
elseif($start_year=="2019") $start_year=1041346800+(31536000*16);
elseif($start_year=="2020") $start_year=1041346800+(31536000*17);
elseif($start_year=="2021") $start_year=1041346800+(31536000*18);
elseif($start_year=="2022") $start_year=1041346800+(31536000*19);
elseif($start_year=="2023") $start_year=1041346800+(31536000*20);
elseif($start_year=="2024") $start_year=1041346800+(31536000*21);
elseif($start_year=="2025") $start_year=1041346800+(31536000*22);
*/
if($start_mon=="1") $start_mon="";
elseif($start_mon=="2") $start_mon=2678400;
elseif($start_mon=="3") $start_mon=2678400+2419200;
elseif($start_mon=="4") $start_mon=2678400+2419200+2678400;
elseif($start_mon=="5") $start_mon=2678400+2419200+2678400+2592000;
elseif($start_mon=="6") $start_mon=2678400+2419200+2678400+2592000+2678400;
elseif($start_mon=="7") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000;
elseif($start_mon=="8") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400;
elseif($start_mon=="9") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400;
elseif($start_mon=="10") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000;
elseif($start_mon=="11") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000+2678400;
elseif($start_mon=="12") $start_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000+2678400+2592000;
if($start_day=="1") $start_day='';
elseif($start_day=="2") $start_day=86400;
elseif($start_day=="3") $start_day=86400+(86400*1);
elseif($start_day=="4") $start_day=86400+(86400*2);
elseif($start_day=="5") $start_day=86400+(86400*3);
elseif($start_day=="6") $start_day=86400+(86400*4);
elseif($start_day=="7") $start_day=86400+(86400*5);
elseif($start_day=="8") $start_day=86400+(86400*6);
elseif($start_day=="9") $start_day=86400+(86400*7);
elseif($start_day=="10") $start_day=86400+(86400*8);
elseif($start_day=="11") $start_day=86400+(86400*9);
elseif($start_day=="12") $start_day=86400+(86400*10);
elseif($start_day=="13") $start_day=86400+(86400*11);
elseif($start_day=="14") $start_day=86400+(86400*12);
elseif($start_day=="15") $start_day=86400+(86400*13);
elseif($start_day=="16") $start_day=86400+(86400*14);
elseif($start_day=="17") $start_day=86400+(86400*15);
elseif($start_day=="18") $start_day=86400+(86400*16);
elseif($start_day=="19") $start_day=86400+(86400*17);
elseif($start_day=="20") $start_day=86400+(86400*18);
elseif($start_day=="21") $start_day=86400+(86400*19);
elseif($start_day=="22") $start_day=86400+(86400*20);
elseif($start_day=="23") $start_day=86400+(86400*21);
elseif($start_day=="24") $start_day=86400+(86400*22);
elseif($start_day=="25") $start_day=86400+(86400*23);
elseif($start_day=="26") $start_day=86400+(86400*24);
elseif($start_day=="27") $start_day=86400+(86400*25);
elseif($start_day=="28") $start_day=86400+(86400*26);
elseif($start_day=="29") $start_day=86400+(86400*27);
elseif($start_day=="30") $start_day=86400+(86400*28);
elseif($start_day=="31") $start_day=86400+(86400*29);
////////////////////////////////////////////////////////////////////// 검색 시작일 끝
////////////////////////////////////////////////////////////////////// 검색 마감일 시작
if($end_year=="2002") $end_year=1009810800;
elseif($end_year=="2003") $end_year=1041346800;
elseif($end_year=="2004") $end_year=1041346800+(31536000*1);
elseif($end_year=="2005") $end_year=1041346800+(31536000*2);
elseif($end_year=="2006") $end_year=1041346800+(31536000*3);
elseif($end_year=="2007") $end_year=1041346800+(31536000*4);
elseif($end_year=="2008") $end_year=1041346800+(31536000*5);
elseif($end_year=="2009") $end_year=1041346800+(31536000*6);
elseif($end_year=="2010") $end_year=1041346800+(31536000*7);
elseif($end_year=="2011") $end_year=1041346800+(31536000*8);
elseif($end_year=="2012") $end_year=1041346800+(31536000*9);
elseif($end_year=="2013") $end_year=1041346800+(31536000*10);
elseif($end_year=="2014") $end_year=1041346800+(31536000*11);
elseif($end_year=="2015") $end_year=1041346800+(31536000*12);
elseif($end_year=="2016") $end_year=1041346800+(31536000*13);
elseif($end_year=="2017") $end_year=1041346800+(31536000*14);
elseif($end_year=="2018") $end_year=1041346800+(31536000*15);
elseif($end_year=="2019") $end_year=1041346800+(31536000*16);
elseif($end_year=="2020") $end_year=1041346800+(31536000*17);
elseif($end_year=="2021") $end_year=1041346800+(31536000*18);
elseif($end_year=="2022") $end_year=1041346800+(31536000*19);
elseif($end_year=="2023") $end_year=1041346800+(31536000*20);
elseif($end_year=="2024") $end_year=1041346800+(31536000*21);
elseif($end_year=="2025") $end_year=1041346800+(31536000*22);
if($end_mon=="1") $end_mon="";
elseif($end_mon=="2") $end_mon=2678400;
elseif($end_mon=="3") $end_mon=2678400+2419200;
elseif($end_mon=="4") $end_mon=2678400+2419200+2678400;
elseif($end_mon=="5") $end_mon=2678400+2419200+2678400+2592000;
elseif($end_mon=="6") $end_mon=2678400+2419200+2678400+2592000+2678400;
elseif($end_mon=="7") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000;
elseif($end_mon=="8") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400;
elseif($end_mon=="9") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400;
elseif($end_mon=="10") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000;
elseif($end_mon=="11") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000+2678400;
elseif($end_mon=="12") $end_mon=2678400+2419200+2678400+2592000+2678400+2592000+2678400+2678400+2592000+2678400+2592000;
if($end_day=="1") $end_day='';
elseif($end_day=="2") $end_day=86400;
elseif($end_day=="3") $end_day=86400+(86400*1);
elseif($end_day=="4") $end_day=86400+(86400*2);
elseif($end_day=="5") $end_day=86400+(86400*3);
elseif($end_day=="6") $end_day=86400+(86400*4);
elseif($end_day=="7") $end_day=86400+(86400*5);
elseif($end_day=="8") $end_day=86400+(86400*6);
elseif($end_day=="9") $end_day=86400+(86400*7);
elseif($end_day=="10") $end_day=86400+(86400*8);
elseif($end_day=="11") $end_day=86400+(86400*9);
elseif($end_day=="12") $end_day=86400+(86400*10);
elseif($end_day=="13") $end_day=86400+(86400*11);
elseif($end_day=="14") $end_day=86400+(86400*12);
elseif($end_day=="15") $end_day=86400+(86400*13);
elseif($end_day=="16") $end_day=86400+(86400*14);
elseif($end_day=="17") $end_day=86400+(86400*15);
elseif($end_day=="18") $end_day=86400+(86400*16);
elseif($end_day=="19") $end_day=86400+(86400*17);
elseif($end_day=="20") $end_day=86400+(86400*18);
elseif($end_day=="21") $end_day=86400+(86400*19);
elseif($end_day=="22") $end_day=86400+(86400*20);
elseif($end_day=="23") $end_day=86400+(86400*21);
elseif($end_day=="24") $end_day=86400+(86400*22);
elseif($end_day=="25") $end_day=86400+(86400*23);
elseif($end_day=="26") $end_day=86400+(86400*24);
elseif($end_day=="27") $end_day=86400+(86400*25);
elseif($end_day=="28") $end_day=86400+(86400*26);
elseif($end_day=="29") $end_day=86400+(86400*27);
elseif($end_day=="30") $end_day=86400+(86400*28);
elseif($end_day=="31") $end_day=86400+(86400*29);
////////////////////////////////////////////////////////////////////// 검색마감일 끝
$start_date = $start_year+$start_mon+$start_day;
$end_date = $end_year+$end_mon+$end_day;
// $start_date 와 $end_date로 DB에서 데이터를 뽑아오는데요..
// 값이 정확치가 않아요..ㅡ.ㅜ 2월달도 끼고. 그리고 검색하는 페이지에서 셀렉트박스로 하잖아요..
// 그부분도 어케 해야할지 몰르겠어요.. 전 일케 했거든요?
?>
///////////////////////////// start_search.php3
<table border=0 cellspacing=0 cellpadding=0 width=150 bgcolor=#FFCC00 align=center>
<form name=search action="search_end.php3" method=post>
<tr>
<td bgcolor=6F9FBF align=center height=20>
<font size=2 face=돋움><b>기간별 발주량 검색</b></font></td>
</tr>
<tr>
<td>
<font size=2 face=돋움>검색시작일<br>
<select name="start_year" size=1>
<?
for ($i=2002; $i <= 2025; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select name="start_mon" size="1">
<?
for ($i=1; $i <= 12; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="start_day">
<?
for ($i=1; $i <= 31; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select><br>
검색종료일<br>
<select name="end_year" size=1>
<?
for ($i=2002; $i <= 2025; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="end_mon">
<?
for ($i=1; $i <= 12; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="end_day">
<?
for ($i=1; $i <= 31; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<br>
<center><INPUT TYPE="submit" value="검색하기"></center>
</td>
</tr>
</form>
</table>
제가 어케 할려는지 아시겠죠?ㅡ.ㅜ 도와주세요..
제가 php의 정말 초보인지라..
댓글 2
-
차카게살자
2002.05.01 18:30
-
캬캬캬
2002.04.30 17:20
이렇게 한번 해보세요
<? // search_end.php3 중 시작부분..
////////////////////////////////////////////////////////////////////// 검색 시작일 시작
$start_date=mktime (0,0,0,$start_mon,$start_day,$start_year);
$end_date=mktime (0,0,0,$end_mon,$end_day,$end_year);
print "$start_date //// $end_date";
//////요부분에 쿼리~~~룰루랄라
?>
///////////////////////////// start_search.php3
<table border=0 cellspacing=0 cellpadding=0 width=150 bgcolor=#FFCC00 align=center>
<form name=search action="search_end.php3" method=post>
<tr>
<td bgcolor=6F9FBF align=center height=20>
<font size=2 face=돋움><b>기간별 발주량 검색</b></font></td>
</tr>
<tr>
<td>
<font size=2 face=돋움>검색시작일<br>
<select name="start_year" size=1>
<?
for ($i=2002; $i <= 2025; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select name="start_mon" size="1">
<?
for ($i=1; $i <= 12; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="start_day">
<?
for ($i=1; $i <= 31; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select><br>
검색종료일<br>
<select name="end_year" size=1>
<?
for ($i=2002; $i <= 2025; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="end_mon">
<?
for ($i=1; $i <= 12; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select size="1" name="end_day">
<?
for ($i=1; $i <= 31; $i++)
{
echo "<option value='$i'>$i</option>";
}
?>
</select>
<br>
<center><INPUT TYPE="submit" value="검색하기"></center>
</td>
</tr>
</form>
</table>
오... 노가다의 결정체..
궁극의 저 코드는... 정말 살아있는 노가다의 전설..