Output errors
| From: | Bzdpltd at aol dot com | Date: | Tue, 22 Oct 2002 17:15:16 +0000 |
| Subject: | Output errors | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22585@lists.php.net to get a copy of this message | ||
Hi there,
I am working to a deadline, and missed something probably simple here.
I have this code, and as I have an if else statement inbetween, it is not outputting the image name
from the database, and rather just how I put the code in ie. $image.
Could someone see where I am going wrong. Help much appreciated. Code selection below.
if (mysql_num_rows($sql_result) ==0)
{
echo (" \n");
}
else {
while ($row = mysql_fetch_array($sql_result)){
$title = $row["title"];
$description = $row["description"];
$image = $row["image"];
echo ("<tr> \n");
echo ("<td width=\"72%\"
valign=\"top\"><h3>$title</h3> \n");
echo ("<p>$description</p></td> \n");
echo ("<td width=\"28%\" valign=\"top\"> \n");
if ($image =='NULL') { echo ''; }
else { echo '<p><img src=$image width="201"
height="160"></p></td>'; }
echo ("</tr> \n");
}}
Thanks
Barry