<html>
<head>
<title>Example for PHP worksheets</title>
</head>
<body>
<div>Hi there!  You want to add your entry!</div>
<?php
// Connect to the database.
$db = new SQLite3('example.db');
// Construct our prepared statement.
$stmt = $db->prepare('INSERT INTO visitors VALUES (datetime(\'now\'), :vn, :vc);');
$stmt->bindValue(':vn', $_POST['visitorname'],    SQLITE3_TEXT);
$stmt->bindValue(':vc', $_POST['visitorcomment'], SQLITE3_TEXT);
$result = $stmt->execute();
?>
<div>I hope that did something that wasn't too terrible…</div>
</body>
</html>
