Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Delete the account associated with the id of the logged in user and all messages the user has sent
- $query = "DELETE FROM public.user WHERE user_id = :user_id";
- $query_params = array(':user_id' => $_SESSION['user_id']);
- try{
- $stmt = $pdo->prepare($query);
- $result = $stmt->execute($query_params);
- }
- catch(PDOException $ex){
- // If something went wront, fail early
- echo '<span style="color: red">ERROR! Code: 005</span>';
- exit;
- }
- ?>
Add Comment
Please, Sign In to add comment