On 19 Apr 2012, at 19:57, Steven Staples wrote:

> I think all you had to do was change this line: (line 27 in the original
> paste)
> $sql = 'INSERT INTO bloggen (date, autor, title, teaser, content)
>      VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
> :teaser, :content);';
> 
> To this:
> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
>      VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, :title,
> :teaser, :content);";
> 
> 
> The issue was (without looking any deeper) the quotes...
> 
> Try that, and let us know.


Still wrong. It should be as follows.

$sql = "INSERT INTO bloggen (date, autor, title, teaser, content)
     VALUES ('" . date( 'Y-m-s H:i:s', time() ) . "', :autor, :title,
:teaser, :content);";

Incidentally, the time() in the date call is unnecessary since that's the 
default value for that parameter.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to