日期:2014-05-16 浏览次数:20497 次
$mindate=$_GET['mindate'];
$maxdate=$_GET['maxdate'];
$sql="SELECT * from `khxx` where $mindate and $maxdate";
<form action="wel.php" method="get">
<input class="inp" type="text" name="mindate" value="<?php echo $mindate=date("Y-m-d",strtotime("-1 day"));?>" />至
<input class="inp" type="text" name="maxdate" value="<?php echo $maxdate=date("Y-m-d",strtotime("-1 day"));?>" />
<input class="sub" type="submit" value="统计"/>
</form>
$mindate = isset($_GET['mindate'])?$_GET['mindate']:date("Y-m-d",strtotime("-1 day"));
$maxdate = isset($_GET['maxdate'])?$_GET['maxdate']:date("Y-m-d",strtotime("-1 day"));
<form action="wel.php" method="get">
<input class="inp" type="text" name="mindate" value="<?php echo $mindate;?>" />至
<input class="inp" type="text" name="maxdate" value="<?php echo $maxdate;?>" />
<input class="sub" type="submit" value="统计"/>
</form>