I\'m trying to add values to a table in phpmyadmin and I get the error: Unknown column \'...\' in \'field list\'.
Here\'s my code:
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 . "')";