You've  misplaced a "$date" variable instead of $datum, $date has no value .

HTH

Jayme.

-----Mensagem Original-----
De: Florian Poppele <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: domingo, 25 de março de 2001 10:26
Assunto: [PHP-DB] problem with writing date/time into db


> Just started with PHP. I'm trying to write a news post script. Somehow den
> actual date isn't written properly into the db. There's always '0000-00-00
> 00:00:00' saved into the db.
>
> my code:
>
> $datum = date("Y-m-d H:m:s");
>
> $sql = "INSERT INTO news (datum,tag,text,autor) VALUES
> ('$date','$tag','$text', '$autor')";
>
> If anyone can help, i'd be happy. Thanks.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to