I'm getting this
-> [Tue Sep 10 10:42:46 2013] [error] [client 127.0.0.1] PHP Warning: SQLite3::exec(): unable to open database file in /var/www/ET/insert.php on line 21, referer: http://localhost/ET/
I changed the owner of the DB file (et.sqlite3) to www-data and now this is what I'm getting. Before I changed the owner I was getting an "unable to write to DB" error. Code is below, any ideas? Thanks.
<?php
echo "<html>";
echo "<head>";
echo "</head>";
echo "<body>";
$db = new SQLite3('./et.sqlite3', SQLITE3_OPEN_READWRITE);
if(!$db)
{
echo "Could not open/access DB";
}
else
{
// get variable from html form
$fName = $_POST['fname'];
$lName = $_POST['lname'];
$email = $_POST['email'];
$db->exec("INSERT INTO customers VALUES('$fName', '$lName', '$email')");
}
echo "</body>";
echo "</html>";
?>