-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeleteplayerfant.php
39 lines (32 loc) · 1.02 KB
/
deleteplayerfant.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
32
33
34
35
36
37
38
39
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert-dev.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.css">
<?php
session_start();
require_once('config.php');
if (isset($_GET['deleteid']) && $_GET['pos']){
$id = $_GET['deleteid'];
$pos = $_GET['pos'];
$name1 = $_SESSION['name'];
$sql = "DELETE FROM `$name1` WHERE id='$id'; ";
$result = mysqli_query($conn,$sql);
if ($result){
header('location:team_create1.php');
}
else{
mysqli_error($conn);
}
if ($pos == 'Forward'){
header('location:forward.php');
}
else if($pos == 'MidFielder'){
header('location:mid_fielder.php');
}
else if ($pos == 'Defender'){
header('location:defender.php');
}
else if($pos == 'GoalKeeper'){
header('location:goalkeeper.php');
}
}
?>