Re: Can someone check this mysql code
| From: | Miguel Cruz | Date: | Mon, 20 May 2002 05:42:21 +0000 |
| Subject: | Re: Can someone check this mysql code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98422@lists.php.net to get a copy of this message | ||
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