Hi folks, I seem to have a problem with my script for only getting records from the previous month... my script is below: Any help would be greatly appreciated 
*<?php require_once('../../Connections/MySQL.php'); ?>
<?php
$month = date('n');
$year = date('Y');
$lastmonth = $month-1;
if ($lastmonth==0) { $lastmonth=12; $year--; }
$startdate = $year . '-' . $lastmonth . '-01';
$enddate = date('Y') . '-' . $month . '-01';
mysql_select_db($database_MySQL, $MySQL);
$query_Recordset1 = "SELECT * FROM PlanInsp WHERE InspDate>='" . $startdate . "' AND InspDate<'" . $enddate . "' ";
$Recordset1 = mysql_query($query_Recordset1, $MySQL) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>*
*<?php require_once('../../Connections/MySQL.php'); ?>
<?php
$month = date('n');
$year = date('Y');
$lastmonth = $month-1;
if ($lastmonth==0) { $lastmonth=12; $year--; }
$startdate = $year . '-' . $lastmonth . '-01';
$enddate = date('Y') . '-' . $month . '-01';
mysql_select_db($database_MySQL, $MySQL);
$query_Recordset1 = "SELECT * FROM PlanInsp WHERE InspDate>='" . $startdate . "' AND InspDate<'" . $enddate . "' ";
$Recordset1 = mysql_query($query_Recordset1, $MySQL) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>*