When I run the following query, SQLite tells me that there is no such column “test”, where “test” is the value in the variable $entryname. I want to store $entryname into the name column, not ‘name’ into $entryname. Does anyone know how to do this?
$query = 'INSERT INTO files (name, description, filename) VALUES (' . $entryname . ', ' . $entrydescription . ', ' . $filename . ')';
You need to quote your string values. They are getting interpreted as a SQLite variable otherwise.
Try the following:
You should also look into preventing SQL Injection.