I have problem with update data to database - I'm getting 0000-00-00. To the input field I'm writing data as "2010-08-10". For insert it works correctly, only for update not.
In inserting it works properly also for dates like that, for update this dates also don't work.
Above codes the both queries:
$rec_query = mysql_query ("INSERT INTO `" . $tb_best_ps . "` (id, name, date, author, www, image) VALUES ('','" . mysql_escape_string ($_POST ["name"]) . "','" . $_POST ["date"] . "','" . mysql_escape_string ($_POST ["author"]) . "','" . mysql_escape_string ($_POST ["www"]) . "','" . mysql_escape_string ($_POST ["image"]) . "')");
$query1 = mysql_query ("UPDATE `" . $tb_best_ps . "`
SET `name` = '" . mysql_escape_string ($_POST ["name"]) . "',
`date` = " . $_POST ["date"] . ",
`author` = '" . mysql_escape_string ($_POST ["author"]) . "',
`www` = '" . mysql_escape_string ($_POST ["www"]) . "',
`image` = '" . mysql_escape_string ($_POST ["image"]) . "'
WHERE `id` = '" . $_POST ["edit"] . "'");
Output when I'm using echo on update query:
UPDATE `swt_best_ps` SET `name` = 'Best Paper Award at ADAPTIVE 2014 for Paper XYZ', `date` = 2010-08-10, `author` = 'David Bowie', `www` = 'http://thinkmind.org/', `image` = 'http://randomweb.com/iaria2014.png' WHERE `id` = '1'