the problem i'm getting is that when the script echo the result from the mysql table ...
I get the same text 2 times ...
why is that ? anyone ?
<?PHP
$conn = mysql_connect("localhost" , "" , "");
if (!$conn) {
echo "unable to connect to DB:" . mysql_error();
exit;
}
if (!mysql_select_db("***")) {
echo "Unable to select members db: " . mysql_error();
exit;
}
$sql = "SELECT titre, soustitre, texte, LienImage FROM nlNouvelles WHERE fkSection='32'";
$result = mysql_query($sql);
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($result) == 0) {
echo "No rows found, nothing to print so am exiting";
exit;
}
while ($row = mysql_fetch_assoc($result)) {
echo "<font class='nouvellegrandtitre'>";
echo $row["titre"];
echo "</font>";
echo "<br><font class='nouvellesoustitre'>";
echo $row["soustitre"];
echo "</font>";
echo $row["texte"];
}
mysql_free_result($result);
?>
Capt E