Hy,
I'm using php to create a table with all users, and then, when I click on the checkbox, remove them.
// This is the code to print the users table
foreach ($result as $row){
$user = $row['users_id'];
echo '<tr><td> ' . $row['username'] . ' </td><td> ' . $row['permission'] . ' </td> <td> <input type="checkbox" name=' . $row['users_id'] . ' value=' . $row['users_id'] . ' " ></td></tr> ' ;
}
I was goin to include on the checkbox input this "onclick="removeuser('.$user.')" , and then a javascript or php function like these:
function removeuser('.$user.')
{
<?php
$db = new PDO('sqlite:backup.sqlite');
$result = $db->query('DELETE * FROM users where username="'.$user.'";');
?>
}
But this doesn't do nothing