Bonjour à tous ,

J'ai un petit soucis concernant un bouton supprimer , enfaite quand j'execute y me dis j'ai une erreur de Parse mais je trouve pas d'ou sa vient . je fais actuellement un script pour mettre à jour supprimer les données, pour l'instant je ne fais que le supprimer , voici le code :

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
<?php include 'connect.php';?>
 
<?php 
	$select = $db -> query("SELECT TitreInformation, DateDebutParutionInfo, DateFinParutionInfo  FROM t_informations"); 
	$categories = $select -> fetchall();
 
 
?>
<table border="1">
		<tr>
			<td>Titre</td>
			<td>Date Debut</td>
			<td>Date Fin</td>
			<td>Supprimer</td>
		</tr>
		<?php foreach($categories as $category):?>
		<tr>
			<td><?= $category['TitreInformation'] ?></td>
			<td><?= $category['DateDebutParutionInfo']?></td>
			<td><?= $category['DateFinParutionInfo']?></td>
			<td>
				<form method="post" action="delete.php">
					<input type="submit" value="Supprimer" id="cmdSupprimer"/>
				</form>
			</td>
 
		</tr>
		<?php endforeach;?>
 
 
</table>
Requete SQL que j'ai mis dans un fichier delete.php:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
<?php include 'connect.php';?>
<?php 
	$delete =$db -> query("DELETE FROM t_informations WHERE TitreInformation= $category['TitreInformation']");
?>
L'erreur vient du $category['TitreInformation']puisque si je saisie un titre de la base et que je clique sur supprimer là sa marche , j'ai toujours un peu mal avec la syntaxe php ou peut etre que dans ce cas je m'y prends mal , si quelqu'un pourrait m'aider sa serait sympa