is it possible to move a table row to another table row while clicking on a button? I already have 2 buttons for Edit.php and Delete.php. But now I want to add a button to move this row to another table.
This information comes from table "offers"
<tr>
<th class='no-index' scope='row'>".$row['id']."</th>
<td>".$row['name']."</td>
<td>".$row['tel']."</td>
<td>".$row['email']."</td>
<td>".$row['phone']."</td>
<td><a class='pdf' href='download.php?client=".$row['id']."' role='button'>
</a></td>
<td><a class='btn-success btn-primary btn-sm' href='edit.php?
client=".$row['id']."' role='button'>Edit</a></td>
<td><a class='btn-danger btn-primary btn-sm' href='delete.php?
id=".$row['id']."' role='button'>X</a></td>
</tr>
This information comes from table "urgent"
<tr>
<th class='no-index' scope='row'>".$row['id']."</th>
<td>".$row['name']."</td>
<td>".$row['tel']."</td>
<td>".$row['email']."</td>
<td>".$row['phone']."</td>
<td><a class='pdf' href='download.php?client=".$row['id']."' role='button'>
</a></td>
<td><a class='btn-success btn-primary btn-sm' href='edit.php?
client=".$row['id']."' role='button'>Edit</a></td>
<td><a class='btn-danger btn-primary btn-sm' href='delete.php?
id=".$row['id']."' role='button'>X</a></td>
</tr>
I have the following:
INSERT INTO urgent SELECT * FROM offers WHERE id = $id;
DELETE FROM offerts WHERE id = $id;
How can I run this sql with a buttonclick and add it below the edit and delete button?