-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaccion_eliminaMiembro.php
33 lines (27 loc) · 1.06 KB
/
accion_eliminaMiembro.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
<?php
//Se llega a esta vista cuando se ha pulsado el botón de eliminar
require_once("gestionBD.php");
require_once("gestionMiembros.php");
require_once("gestionJugadores.php");
session_start();
$conexion = crearConexionBD();
//elimina jugador
if(isset($_REQUEST['dnijugador'])){
$dniJugador = $_REQUEST['dnijugador'];
$eliminaJugador = eliminaJugador($conexion, $dniJugador);
header("Location:gestion.php");
//elimina entrenador
}else if(isset($_REQUEST['dnientrenador'])){
$dniEntrenador = $_REQUEST['dnientrenador'];
$eliminaEntrenador = eliminaEntrenador($conexion, $dniEntrenador);
header("Location:gestion.php");
//elimina ojeador
}else if(isset($_REQUEST['dniojeador'])){
$dniOjeador = $_REQUEST['dniojeador'];
$eliminaOjeador = eliminaOjeador($conexion, $dniOjeador);
header("Location:gestion.php");
}else{
header("Location:gestion.php");
}
cerrarConexionBD($conexion);
?>