Re: INSERT INTO using PHP
Pedro Graca wrote:
> Jerim79 wrote:
> > $query='INSERT INTO review_registration() VALUES($FName, $LName,
> > $Company, $Title, $Address, $Apt, $City, $State, $Zip, $Phone, $Fax,
> > $Email, $Var1l, $Var2, $Var3, $Var4, $Var5)'
> >
> > The error message is:
> >
> > Query failed: Unknown column '$FName' in 'field list'
>
> The error is a PHP error.
> Expand your error message:
>
> <?php
> // ...
> $res = mysql_query($query);
> if (!$res) {
> # die('Query failed: ' . mysql_error()); // simple version
> die('Query failed: ' . mysql_error() .
> ' The SQL statement was: ' . $query); // expanded version
> }
>
>
> --
> I (almost) never check the dodgeit address.
> If you *really* need to mail me, use the address in the Reply-To
> header with a message in *plain* *text* *without* *attachments*.
It is working now. The double quotes was the fix. Thanks for all the
help. (I still have the parse the phone numbers to get them to enter
right.) |