Helllo Friends,

I have searched regarding this issue and have gotten some help from previously posted threads but still cannot get this going and would appreciate it if someone can help me with this.

I would like to implement search by date. So the user would insert the search date in this format: mm/dd/yyyy.

and the search field on the for is called 'search_date';
My code:
PHP Code:

mysql_connect($dbhost$dbuser$dbpass) or die (mysql_error('CANNOT CONNECT'));
$db mysql_select_db($dbname$conn) or die (mysql_error('CANNOT CONNECT TO DB'));

$curdate date("m-d-Y"); // current date in dd/mm/yyyy

$search_date trim($search_date);

$search_date = isset($_GET['search_date']) ? $_GET['search_date'] : $curdate;


$sql "SELECT * FROM $tblname";


$sql .= "WHERE `date_created`=" .$search_date;
$result mysql_query($sql);

while ($rows mysql_fetch_array($result))
//$date_created being assigned to date_created db column

$date_created $rows['date_created'];


$date_created date("m \- d \- Y"strtotime($rows['date_created']));


Any help would highly be appreciated.

Thanks a lot.