I dont know what format jquery sends the date over as but entering the date into the db as YYYY-mm-dd wont cause you too many problems as there are functions in MYSQL itself that will let you format dates as you retrieve them.
Another option would be to store the information as a timestamp in the db. Simply work out what format jquery is sending the data as, break the data up and use it in mktime(). Then when you retrieve it from the db you can use the date() function to format it however you want.
$date="28/07/2011"; //check date format here before continuing. list($day,$month,$year)=explode('/',$date); $timestamp=mktime(0,0,0,$month,$day,$year); //insert into db. //retrieve from db at your leisure and simply $data=$timestamp; //would be your timestamp from db, have taken from above for simplicity echo date('l jS F Y',$data);
Sorry for the slow reply, had a bit of a mad weekend xD Anyway, what you need to do...in an appropriate place in the script you put the previous code in...
$date=$_POST['date']; //or $_GET //check date format here before continuing. list($day,$month,$year)=explode('/',$date); $timestamp=mktime(0,0,0,$month,$day,$year); $final_date=date('Y-m-d',$timestamp);
then you can put $final_date into the db and it should work