Page 1 of 1

Help with UPDATE datetime

Posted: Fri Jan 31, 2014 5:13 pm
by parinho7
I want to execute an UPDATE query to update a datetime field but I am not getting the desired results!

Here is the query:

Code: Select all

$result = mysqli_query($con, "UPDATE `tasks` SET `deadline`=".$_POST['dt'].", `status_id`=3 WHERE `task_id`=".$_POST['id']."");
The deadline is the datetime field and I am POSTING the dt from a text input. Please help me. Thanks in advance!

Re: Help with UPDATE datetime

Posted: Fri Jan 31, 2014 9:44 pm
by Celauran
What does $_POST['dt'] contain? What is the expected result? What's happening instead?