Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("../inc/connexion_bdd.php");
- if(!isset($_GET['id']) || empty($_GET['id']))
- $id_user = 2; // mise en place temporaire, jusqu'à ce que la connexion existe
- else
- $id_user = $_GET['id']; // sinon on définit le paramètre existant; (utilisé pour la page profil)
- $identifiant = $_GET['id'];
- $identifiant2 = $_GET['id2'];
- $req_maj = "DELETE FROM `liens_amitie` WHERE id_membre_1 =".$identifiant." AND id_membre_2 =".$identifiant2."";
- $requete_maj = $bdd->query($req_maj);
- $req_nouv_demande = "INSERT INTO `share_yourself`.`liens_amitie` (`id_membre_1`, `id_membre_2`, `etat`, `traitement`) VALUES (".$identifiant.",".$identifiant2.", '1', '1');";
- $requete_nouv_demande = $bdd->query($req_nouv_demande);
- header('Location: ../page_profil.php?id=2');//Redirection vers le profil visité
- exit();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement