par
Chrill » 07 févr. 2012, 18:55
Merci d'une réponse aussi rapide
Warning: chunk_split() expects parameter 1 to be string, array given in C:\Program Files\EasyPHP-5.3.8.1\www\news\voir.php on line 47
voilà la réponse et voilà comment je l'ai placer:
Code : Tout sélectionner
<?php
require "config.php";
mysql_connect(DB_HOST,DB_LOGIN,DB_PASS);
mysql_select_db(DB_BDD);
$id=$_GET['id'];
$sql="SELECT * FROM news WHERE id=$id";
$req= mysql_query($sql) or die ('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$data=mysql_fetch_assoc($req);
echo"<h1>{$data["titre"]}</h1>";
$data=chunk_split($data);
echo"<p>{$data["contenue"]}</p>";
echo"<p align\"right\">".date("j/n/Y G:i",strtotime($data["date"]))."</p>";
?>
ai-je fait une erreur?
ne t'inquiète pas il y a un copyright a la fin du site

Merci d'une réponse aussi rapide :)
Warning: chunk_split() expects parameter 1 to be string, array given in C:\Program Files\EasyPHP-5.3.8.1\www\news\voir.php on line 47
voilà la réponse et voilà comment je l'ai placer:
[code]<?php
require "config.php";
mysql_connect(DB_HOST,DB_LOGIN,DB_PASS);
mysql_select_db(DB_BDD);
$id=$_GET['id'];
$sql="SELECT * FROM news WHERE id=$id";
$req= mysql_query($sql) or die ('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$data=mysql_fetch_assoc($req);
echo"<h1>{$data["titre"]}</h1>";
$data=chunk_split($data);
echo"<p>{$data["contenue"]}</p>";
echo"<p align\"right\">".date("j/n/Y G:i",strtotime($data["date"]))."</p>";
?>[/code]
ai-je fait une erreur?
ne t'inquiète pas il y a un copyright a la fin du site :)