So, I am trying to redirect after I delete a user from the MySQL table. I have achieved this. The problem is that in the "delete-user.php" URL, I specify a "ID" to delete. For some reason, the "delete-user.php" page is blank, even when I try to put a redirect link.
Basically, the "ID" in the url is stopping me from clicking a redirect button to go back to the last page. By stopping I mean that the linked text is not showing up.
My code for delete-user.php is below.
<!DOCTYPE html>
<html lang="en">
<?php
$SQL = $odb->prepare("DELETE FROM users WHERE `ID` = :id");
$SQL->execute(array(':id' => $id));
?>
<a href="http://www.thisistheredirecturl.com">Go Back</a>
</html>
Keep in mind that the actual delete function works.
Thank you.
Edit: This is how the manage-users page looks. http://prntscr.com/7o6kno When you click on delete, it will redirect to the delete-user page and delete the user. (With the id parameter of the user) Unfortunately, I cannot get it to redirect back to the manage-users page.