i want people to be able to type in the date in normal form:
for example:
12/25/2003
This needs to be converted to mysql 2003-12-25
Here's my code:
$date_input = $DATE;
$date_output = preg_replace('-^(\d\d)/(\d\d)/(\d\d\d\d)$-', "\\3-\\1-\\2", $date_input);
It works

My problem is that the day has to be 2 digits, and so does the month. Therefore:
2/2/2004 does not work. The user must type in 02/02/2004
so i tried:
$DATE = date("d/m/Y");
$date_input = $DATE;
$date_output = preg_replace('-^(\d\d)/(\d\d)/(\d\d\d\d)$-', "\\3-\\1-\\2", $date_input);
That didn't work...
Can anyone help?
Thanks
Noam