eliminar(); if($resultado){ switch ($origen) { case "gestion_candidato": header("Location: ".$origen.".php?oid=".$idCandidato."#capacidades"); break; case "detalle_candidato": header("Location: ".$origen.".php?oid=".$idCandidato."#capacidades"); break; case "lista_Candidatos": header("Location: lista_candidatos.php?order=nombre&modo=asc&byEstado=0"); break; } } else { header("Location: gestion_candidato.php?oid=".$idCandidato."#capacidades"); } } catch (Exception $e) { $msg=$e->getMessage(); include_once("showError.php"); } ?>