Nags Nags - 1 year ago 42
PHP Question

Using jQuery variable in PHP page

I'm using jQuery Ajax to store some value in MySql DB

So far I'm passing a start_time as a datetime object like

Wed Aug 15 2012 14:00:00 GMT+0530 (IST)

and I'm getting this value on my php page like


in my db, I want to store that value like

2012-8-17 20:45

so the $_POST['start_time'] that value is looking like an integer(I'm not sure )

my question is what to do with that integer value so that it could store in my db like

2012-8-17 20:45


$date=date('Y-m-d H:i',$bla);
echo $date;