Hi ! You said anything about connecting to mysql.
You need to go through 2 steps before mysql_query(). These are mysql_connect() mysql_select_db() please check the URL below, everything is explained very clearly. http://www.php.net/manual/en/function.mysql-query.php You could also tell us what mysql_error() said. --------------------------------------- =d0Mi= , DCS.net [EMAIL PROTECTED] >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 > query,sql --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php