|
With this, you get time(), format it in the second line, then reconvert it to time with strtotime, which wont be stored correctly in the database. In fact, your conversion in the second line is completely off, since gmdate is basically the same as date and will result in "2007200720072007-" etc.
Really, you should just set the field to INT(11) and store time(). It's much simpler to work with.
But if you really want to keep that format, you would do gmdate('Y-m-d H:m:s', $phpTime) and add that with your query, not $dateAdded, unless you wanted a GMT version of time().
|