Bonjour à tous je ne comprend pas le pourquoi j'ai comme retour undefined index alors que tout me semble plutôt ok voici donc le code en attente d'une réponse
Cordialement.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
34
35
36
37
38
39
40
41 <?php session_start(); if (empty($_SESSION['admin']) && !empty($_SESSION['membre'])) { header('Location:index.php'); } include_once '../config.php'; $bdd = new PDO("mysql:host=" . Config::SERVEUR . ";dbname=" . Config::BASE, Config::UTILISATEUR, Config::MOTDEPASSE); $repas_ma = $_POST['rma']; $req = $bdd->prepare('SELECT COUNT(rma) FROM evenement WHERE rma = 1'); $req->execute(); $resultat = $req->fetch(); echo "repas matin = ".$resultat['rma']; ?> <html> <head> <meta charset='utf-8'/> <?php include_once 'CDN_calendrier.php'; ?> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <link href="calendar.css" rel="stylesheet" type="text/css"/> <link href="page_de_calendrier.css" rel="stylesheet" type="text/css"/> <script src="https://code.jquery.com/ui/1.11.2/jquery-ui.min.js"></script> </head> <body> <!-- <div id="fond_ecran" class="fond_ecran"/>--> <!-- <div class="button"> <FORM ACTION="http://localhost/fdv/calendrier/Formulaire_ajout_event.php"> <INPUT TYPE="SUBMIT" VALUE="Ajout événement"></FORM> </div>--> <div class="rectangle"> <p> Nombre de repas le matin: <?php echo $resultat['rma']?></p> <p> Nombre de repas le midi:</p> <p> Nombre de repas le soir:</p> </div>
Partager