<table align="center" border="1">
<tr>
<td valign="top">
<p align="center"><font face="Comic Sans ms">News
:</font></p>
</td>
</tr>
<tr>
<td>
<p>
<font face="Comic Sans ms">
<BR>
<center>
<font size="4"><b>L'espace News !</b></font>
</center>
<br><br><br>
<table align=center border="1">
<tr>
<td valign=top>
<?php
require('conf.php');//Inclure les paramètres conf
$c1 = @mysql_connect("$hote","$log","$pass") or die("IMP TO CONNECT");//Connexion à SQL
@mysql_select_db("$base",$c1) or die("selection impossible");
$sql1 = "select * from promotion order by id desc";
//"select * from promotion order by id desc limit 15";
//Afichage des promotion, vous pouvez changé limit 5 par limit 10 ou autre.<br>
//Limit 2 limite à 2promotion par pages, 5, à 5news par page.
if($p1 = @mysql_unbuffered_query($sql1,$c1)){
while($data1 = @mysql_fetch_array($p1)){
?>
<table border="1">
<tr>
<td>
<font size="2"><? echo $data1['bloc1']; ?></font>
<a href="index.php?page=modifn&code=<?= $_GET["id"] ?>>Modifier</a>
<a href="index.php?page=modifn&code=<?= $_GET["id"] ?>>Modifier</a>
</td>
</tr>
</table>
<?
}
}
//Fermeture SQL 2
?>
</td>
</tr>
</table>
<BR><BR><BR>
</font>
</p>
</td>
</tr>
<tr>
<td>
<p>
<strong>
<font color="#000000" size="1.8" face="Verdana, Arial, Helvetica, sans-serif">
[ <a href="index.php?page=ajoutn">Ajouter des new</a> ]
</font>
</strong>
</p>
</td>
</tr>
</table>
Non, j'ai pas pris de café et il a fait chaud hier, il a fait 45° apparement.non j'ai pas pris de café et il a fait chaud hier il a fait 45°apparement ce matin c'est pas terrible t'as mis la femme de zeus en avatar
oui c'est vrai c'est plus facile à lire et j'avais oublié de rajouter çaHé oui, je suis un gros fénéant
euh j'ais essayé les liens il me renvoi la page par défaut donc c'est pas bonest-ce que tu as essayé le code avec les liens ?
euh là je comprends en fait "code" va servir pour faire les liens des pages news et promos (pages quasi identiques) pour soit les modifier ou soit pour les supprimerpourquoi déclarer des variables dans un script si elle n'ont qu'une portée locale (au script) ?
<?php
$pageOK = array('news' => 'news.php',
'presentation' => 'presentation.php',
'cad'=> 'cad.php',
'contact' => 'contact.php',
'mail' => 'mail.php',
'imprimantes' => 'imprimantes.php',
'partenaires' => 'partenaires.php',
'catalogue' => 'catalogue.php',
'developpements' => 'developpements.php',
'assistance' => 'assistance.php',
'achat en ligne' => 'achat_ligne.php',
'formation' => 'formation.php',
'logiciels' => 'logiciels.php',
'promotions'=> 'promotions.php',
'service technique' => 'service_technique.php',
'administration' => 'administration.php',
'identification' => 'identification.php',
'suprimer' => 'suprimer.php',
'modif' => 'modif.php',
'ajout' => 'ajout.php',
'suprimern' => 'suprimern.php',
'modifn' => 'modifn.php',
'ajoutn' => 'ajoutn.php',
'ajout_confirm' => 'ajout_confirm.php',
'new' => 'new.php',
'promo' => 'promo.php');
if ( (isset($_GET['page'])) && (isset($pageOK[$_GET['page']])) ) {
echo "page : ".$_GET["page"]."<br>\n";
echo "tab page : ".$pageOK[$_GET['page']]."<br>\n";
include($pageOK[$_GET['page']]);
} else {
include($pageOK['news']);
}
?>donc si je comprends bien id est reconnu donc le problème doit venir de "code"/index.php?page=modifn%20&%20code=83
index.php?page=modifn & page=
mais il ne faut pas d'espace autour de &index.php?page=modifn&page=id
sinon il considère tout comme l'argument pageetpage : modifn
tab page : modifn.php
Notice: Undefined variable: id in c:\program files\easyphp1-8\www\modifn.php on line 6
Notice: Undefined variable: id in c:\program files\easyphp1-8\www\modifn.php on line 9
Notice: Undefined variable: bloc1 in c:\program files\easyphp1-8\www\modifn.php on line 10
Notice: Undefined variable: total in c:\program files\easyphp1-8\www\modifn.php on line 11
Notice: Undefined variable: bloc2 in c:\program files\easyphp1-8\www\modifn.php on line 36
mais je vais essayer de les régler tout seul merci encorepage : suprimern
tab page : suprimern.php
Notice: Undefined variable: id in c:\program files\easyphp1-8\www\suprimern.php on line 4
Promotion bien suprimée