Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function show_alert()
- {
- var r = confirm("Would you like to delete this user?");
- if (r == true)
- {
- <?php
- if(isset($_POST['user_id']) && ctype_digit($_POST['user_id']))
- {
- $db = new mysqli("99.99.99.999", "99.99.99.999", "99.99.99.999", "99.99.99.999");
- $statement = $db->prepare("DELETE FROM `afb2_accounts` WHERE `account_id` = '{$_POST['user_id']}' LIMIT 1");
- $statement->bind_param("user_id", $_POST['user_id']);
- $statement->execute();
- }
- ?>
- }
- else
- {
- alert("You pressed Cancel!");
- }
- }
- </script>
- <!-- The action -->
- <form method="post">
- <input type="image" src="/img/delete_user32.ico" title="Delete" name="user_id" value="<?php echo $row['account_id'];?>" onclick="show_alert()"/>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement