Unknown Column in Field List. PHP + Mysql
I think this
$query = "INSERT INTO tblGames (name, description, image) VALUES ($name, $description,". $target_path .")";
should be
$query = "INSERT INTO tblGames (name, description, image) VALUES ('$name', '$description', '". $target_path ."')";
It looks like the values should be quoted in your $query
statement, i.e. $name
, $description
, and $target_path
.
$query = "INSERT INTO tblGames (name, description, image)
VALUES ('$name', '$description', '" . $target_path . "')";