4 messages in com.mysql.lists.mysqlInsert dates with PHP
FromSent OnAttachments
Defryn, Guy15 May 2002 20:57 
Uma Shankari T.15 May 2002 21:08 
Defryn, Guy15 May 2002 21:12 
do...@dcs.net15 May 2002 22:55 
Subject:Insert dates with PHP
From:Defryn, Guy (G.P.@massey.ac.nz)
Date:05/15/2002 08:57:40 PM
List:com.mysql.lists.mysql

I am working with PHP for the first time and I need a form To insert some details and a date.

When I check the mysql database the date is displayed as 0000-00-00

Here is my php script:

<? $query = "Insert into
computers(id,itnumber,hdd,processor,ram,monitor,os,invoice,datebought) values" .
"(NULL,'$itnumber','$hdsize','$processor','$ram','$monitor','$os','$invoice' ,'$datebought')";

mysql_query($query) or die (mysql_error());

?>

Everything else works fine. When I enter the date into mysql itself it works
fine.

Thanks