View Single Post

   
  #5 (permalink)  
Old 02-28-2008, 09:31 AM
Pedro Graca
 
Posts: n/a
Default Re: INSERT INTO using PHP

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*.
Reply With Quote