-
Notifications
You must be signed in to change notification settings - Fork 0
/
eliminar.php
31 lines (26 loc) · 1023 Bytes
/
eliminar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
sec_session_start();
?>
<?php if (login_check($mysqli) == true) : ?>
<?php
require_once'includes/psl-config.php';
// ------------------------------------Delete clients--------------------------------
if(isset($_GET["remove"])){
$id = $_GET["remove"];
$RemoveCommande = $database->prepare("DELETE FROM commandes WHERE id = :id");
$RemoveCommande->bindParam("id",$id);
echo $RemoveCommande->execute();
// header("Location:protected_page.php");
echo "<script type='text/javascript'>window.top.location='protected_page.php';</script>"; exit;
}else {
echo'Null';
// echo $_GET["removee"];
}else : ?>
<div class="alert alert-danger container d-print-none mt-2" role="alert">
Vous n'avez pas l'autorisation d'accéder à cette page ! S'il vous plait <a href="index.php">login</a>.
</div>
<?php
endif;
?>