Update file news.php
This commit is contained in:
parent
dac3ea7149
commit
97c6ea0614
@ -72,11 +72,13 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) {
|
|||||||
if (isset($_GET['search'])) {
|
if (isset($_GET['search'])) {
|
||||||
$req = $bdd->prepare("SELECT ID, titre, date FROM articles WHERE classification <= :accreditation AND titre LIKE '%:search%'ORDER BY date DESC");
|
$req = $bdd->prepare("SELECT ID, titre, date FROM articles WHERE classification <= :accreditation AND titre LIKE '%:search%'ORDER BY date DESC");
|
||||||
$req->bindParam(":search", $_GET['search']);
|
$req->bindParam(":search", $_GET['search']);
|
||||||
|
$req->bindParam(":accreditation", $_SESSION['accreditation']);
|
||||||
|
$req->execute();
|
||||||
} else {
|
} else {
|
||||||
$req = $bdd->prepare("SELECT ID, titre, date FROM articles WHERE classification <= :accreditation ORDER BY date DESC");
|
$req = $bdd->prepare("SELECT ID, titre, date FROM articles WHERE classification <= :accreditation ORDER BY date DESC");
|
||||||
|
$req->bindParam(":accreditation", $_SESSION['accreditation']);
|
||||||
|
$req->execute();
|
||||||
}
|
}
|
||||||
$req->bindParam(":accreditation", $_SESSION['accreditation']);
|
|
||||||
$req->execute();
|
|
||||||
$resultat = $req->fetchAll(PDO::FETCH_ASSOC);
|
$resultat = $req->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
echo "<h1>Dernières news du Club</h1>";
|
echo "<h1>Dernières news du Club</h1>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user