The following files exists in this folder. Click to view.
ta_bort_användare.php14 lines UTF-8 Unix (LF)
<?php
session_start();
require_once('check_login.php');
require_once('database_connection.php');
$userId = trim($_GET['userId']);
#Tar bort allt som har med användaren att göra
$sql = "DELETE FROM transaction WHERE userId = :userId;DELETE FROM account WHERE userId = :userId;DELETE FROM user where userId = :userId;";
$stm = $pdo->prepare($sql);
$stm->execute(array('userId' => $userId));
header('location: admin.php');
?>