//usage
// Initialize the SQLite wrapper
$dbPath = 'your_database.db';
$db = new SQLiteWrapper($dbPath);

// Select from a table
$result = $db->select('your_table', '*', 'id = :id', 'name ASC');
$result = $db->select('your_table', '*', 'id = :id', 'name ASC', [':id' => $id]);

// Insert into a table
$insertData = ['name' => 'John', 'age' => 30];
$db->insert('your_table', $insertData);

// Update records in a table
$updateData = ['age' => 31];
$db->update('your_table', $updateData, 'name = :name');

// Delete records from a table
$db->delete('your_table', 'age < :age');

// Close the database connection
$db->close();



//post

// Assuming you have a form like this in your HTML
// <form method="POST" action="process_form.php">
//     <input type="text" name="name">
//     <input type="text" name="age">
//     <input type="submit" name="submit">
// </form>

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Remove the "submit" field from the POST data
    unset($_POST['submit']);
    
    // Initialize the SQLite wrapper
    $dbPath = 'your_database.db';
    $db = new SQLiteWrapper($dbPath);

    // Insert into a table from the POST data
    $insertData = $_POST;
    $db->insert('your_table', $insertData);

    // Update records in a table from the POST data
    $updateData = $_POST;
    $db->update('your_table', $updateData, 'name = :name');

    // Close the database connection
    $db->close();
}

