Try this.. <?php > > $answers="$band, $middlename, $pot"; > $date=date ("l dS of F Y h:i:s A"); > > $sql = "INSERT INTO prizeline VALUES ('', 'email', 'name', 'address', 'answers', > 'date');";
-Balaji -----Original Message----- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 11:12 AM To: PhilipNZ Staff Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Can someone check this mysql code On Mon, 20 May 2002, PhilipNZ Staff wrote: > My code below don't want to insert the code into the database what am > I doing wrong? > > <?php > > $answers="$band, $middlename, $pot"; > $date=date ("l dS of F Y h:i:s A"); > > $sql = "INSERT INTO `prizeline` (`id`, `email`, `name`, `address`, > `answers`, `date`) VALUES ('', 'email', 'name', 'address', 'answers', > 'date');"; What is the error message shown when you printed mysql_error() ? And you probably don't want the semicolon at the end of the query string (the one inside the double quotes). miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
**************************Disclaimer************************************************** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ****************************************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php