I am trying to pass date to a database so that I can display the results.
Here is the HTML that I am sending
Location_results.php?Startdate=01%2F01%2F08&Enddate=07%2F31%2F08&Area=INTERAREA&button=Submit
It is only looking at the month and not the whole string.
In the database the date is like this 01/20/08.
below is the search that I am doing in MYSQL
$colname_Get_Total_Region = "-1";
if (isset($_GET['Startdate'])) {
$colname_Get_Total_Region = $_GET['Startdate'];
}
$colname2_Get_Total_Region = "-1";
if (isset($_GET['Enddate'])) {
$colname2_Get_Total_Region = $_GET['Enddate'];
}
$colname1_Get_Total_Region = "-1";
if (isset($_GET['Area'])) {
$colname1_Get_Total_Region = $_GET['Area'];
}
mysql_select_db($database_TechSupport, $TechSupport);
$query_Get_Total_Region = sprintf("SELECT * FROM Chronics_report WHERE Ticket_Created_Date >= %s AND Chronics_report.Ticket_Created_Date <= %s AND Chronics_report.Area = %s ", GetSQLValueString($colname_Get_Total_Region, "text"),GetSQLValueString($colname2_Get_Total_Region, "text"),GetSQLValueString($colname1_Get_Total_Region, "text"));
$Get_Total_Region = mysql_query($query_Get_Total_Region, $TechSupport) or die(mysql_error());
$row_Get_Total_Region = mysql_fetch_assoc($Get_Total_Region);
$totalRows_Get_Total_Region = mysql_num_rows($Get_Total_Region);