You can use time(); to see how php will format a date. You can echo out the values if you want from each of the code below to get a feel for how it works. Php is well documented, and should be very easy to find
$date = time();
$day = date('d',$date);
$month = date('m',$date);
$year = date('Y',$date);
php date page[
^]
I believe the insert format for mysql is yyyy-mm-dd, while date time is the same with HH:MM:SS appended to it. You can use a BETWEEN on dates to limit the search.
Mysql is also very well documented on their own website.
MySql docs[
^]