Bonjour,
Voila , je suis en train de créer un site pour un groupe de metal Haut savoyard.J'ai donc créer un système de news(pas celui du site du zero).J'ai tout créer de a à z mais là j'ai un problème.
Je liste mes news avec ce code :
Code : PHP 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
include('config.php');
mysql_connect($adresse,$log);
mysql_select_db($db_name);
//recuperation des utilisateur
$reponse=mysql_query("SELECT * FROM news ORDER BY id ")or die(mysql_error());
//creation du tableau avec la boucle
$stop='0'
?>
<a href="add_news.php">Ajouter une news
</a></p>
<div align="center">
<table width="80%" border="1">
<tr>
<th width="13%" scope="col">Modifier</th>
<th width="13%" scope="col">Suprimer</th>
<th width="54%" scope="col">Titre</th>
<th width="10%" scope="col">Posteur</th>
<th width="10%" scope="col">Date</th>
</tr>
<?php
//creation du tableau avec la boucle
while($donnees = mysql_fetch_array($reponse))
{
?>
<tr>
<th scope="row"> </th>
<td><div align="center"><a href="del_news.php?id=<?php $donnees['id'];?>">Suprimer</a></div></td>
<td><?php echo $donnees['titre'];?></td>
<td><?php echo $donnees['posteur'];?></td>
<td><?php echo $donnees['date'];?></td>
</tr>
<?php
$stop++;
}
?>
</table>
|
J'ai un problème avec le
Citation : Pas de titreCode : Autre1
| <a href="del_news.php?id=<?php $donnees['id'];?>">Suprimer</a>. |
Lorsque je m'approche du lien , il me met en lien
http://127.0.0.1/rouken/admin/del_news.php?id=
Et pas la suite.Comment résoudre cela,en sachant que j'ai fait la même chose en prenant comme variable id=<?php $donnees['titre'];?> et que le titre s'affiche bien dans la colonne titre du tableau.
Merci d'avance.