exit; } $stmt = insertRssUrl($_SESSION['login'], $_POST['rssurl']); header('Location: ../vues/vue_profile.php'); exit; } catch (Exception $e) { header('Location: ../vues/vue_profile.php?error=db'); exit; } } elseif (isset($_POST['deleteurl']) && $_POST['deleteurl'] !== '') { if (!(isset($_SESSION['login']) || isset($_SESSION['pwd']))) { header('Location: ../vues/vue_connexion.php'); exit; } try { $pdo = initConnectionSimple(); $stmt = deleteRssUrl($_SESSION['login'], $_POST['deleteurl']); header('Location: ../vues/vue_profile.php'); exit; } catch (PDOException $e) { header('Location: ../vues/vue_profile.php?error=db'); exit; } } function getRss($id) { try { $stmt = getRssUrls($id); $urls = array(); while ($result = $stmt->fetch(PDO::FETCH_OBJ)) { $urls[] = $result->url;
function deleteTwitterAccount($id, $twittAccount) { try { $pdo = initConnectionSimple(); $sql = 'DELETE FROM DeleteTwitter WHERE IDENTIFIANT = \'' . $id . '\' AND ACCOUNT_TWITTER = \'' . $twittAccount . '\';'; return execQuery($pdo, $sql); } catch (PDOException $e) { throw $e; } }