the problem was that i was echoing out the path but what i need it to do was to echo the image name <img height="300" src="<?echo $row['name']?>">Code:<html>
<head>
<title>Download Image</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$connection = mysql_connect("localhost","root","") or die("impossible de se connecter au serveur mysql.<p>Veuillez réessayer plus tard");
$res = mysql_select_db("upload2") or die("impossible de sélectionner la base de données <b>ecole</b>.<p>Veuillez réessayer plus tard");
$requeteStr = "SELECT name,texteNouvelle FROM upload2";
$resultatRequete = mysql_query($requeteStr) or die("la requete de sélection a échoué.<p>Veuillez réessayer plus tard");
while ($row = mysql_fetch_array($resultatRequete))
{
?>
<img height="300" src="<?echo $row['name']?>">
<?php
echo $row['texteNouvelle'];
}
?>
</body>
</html>
but ty for these little tips it has help me out
and lol when i query the select results twice i laugh it too LOL
so just relax and have fun now
if you want i will show you how i will animate my news when it will be done
Please use code tags when posting code. Nice work on solving the problem, is this in reference to another question you have already asked?
yeah Jordan but the thread of before was " problem showing up an image "![]()
has been locked thats why i start a new one so you guys can see it
anyway no big deal i dont like trouble
and sry about the tag i forgot to add it
Can you post a link to the thread? Odd that it was locked and not resolved.
It's this thread: http://forum.codecall.net/php-forum/...-up-image.html
I couldn't get the merge to work for some reason.
nicnicic, thanks for coming back and sharing your solution.
I HATE your code, nicnicic.
Try this instead:
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Download Image</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$connection = mysql_connect("localhost","root","") or die("impossible de se connecter au serveur mysql.<p>Veuillez réessayer plus tard");
$res = mysql_select_db("upload2") or die("impossible de sélectionner la base de données <b>ecole</b>.<p>Veuillez réessayer plus tard");
$requeteStr = "SELECT name,texteNouvelle FROM upload2";
$resultatRequete = mysql_query($requeteStr) or die("la requete de sélection a échoué.<p>Veuillez réessayer plus tard");
while ($row = mysql_fetch_array($resultatRequete))
{
?>
<img height="300" src="<?echo $row['name']?>">
<?php
echo $row['texteNouvelle'];
}
?>
</body>
</html>
Last edited by John; 11-18-2008 at 03:46 PM.
Xav, use PHP tags when posting PHP -rep for you mister. And maybe he doesn't want his code to be xhtml strict. The top 5 most popular websites: yahoo, google, youtube, live, and facebook are not xhtml compliant.
yeah lol that was funny
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks