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:

$conn 
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'));

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

//SEARCH DATE ENTERED BY USER
$search_date trim($search_date);

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

// SELECT STATEMENT

$sql "SELECT * FROM $tblname";

//APPENDING THE BASE QUERY WITH USER SEARCH DATE

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

//WHILE LOOP STARTS HERER        
        
while ($rows mysql_fetch_array($result))
        {
//$date_created being assigned to date_created db column

$date_created $rows['date_created'];

//DISPLAYING DATE IN FOLLOWING FORMAT

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

echo 
$date_created;

Any help would highly be appreciated.

Thanks a lot.