Im trying use the following insert:
mysql_query ("INSERT INTO users (company_name, fname, lname, salt, email, date_added, password)
VALUES ('$CompanyName', '$fname', '$lname', '$salt', '$email', '$mysqldate', '$encrypted')")
or die(mysql_error());
But I get an error:
Unknown column 'company_name' in 'field list'
If I echo out the query, paste it as an SQL statement and run it, it does the insert. All the fields exist, and, as I say, if I echo out the result it works fine.