Hi,
I've got a site where that's got a database behind it. Currently it has loads of items in rows that all have different pictures. There is a field called "Image" that has the name of the image ie. example.jpg.
Then I have a folder on my webserver called image where the pictures are stored with the same file names and extensions.
Now, I want to display the correct image for the item that the page is showing. I have this code but it's just showing the usual box with a red X in the top left.
I should also point out that the 'Item' line is working correctly and displaying the name of the item.
Quote<table border='1' align="left" width="100%">
<?php
while($row = mysql_fetch_array( $result )) {
$dir = '/image';
$image = $row['Image'];
echo('<b><h1>'.$row['Item'].'</h1></b><br />');
echo "<tr>";
echo "<td width=15%>"."<img width=100% src='$dir/$image /'></td>";
echo "<td width=85% align=center>Description</td>";
echo "</tr>";
}
?>
</table>
Any ideas why this isn't working?
Problem with DB connection
Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't make exactly what I thought it will. Can you give me a hand please. There we go:Code: [Select]
SQL query not working well
Hi,
Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named "color". The images are named the "color.jpg"I am attempting to loop through
Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a users details entered into a login form against details stored in an existing flat file.No matter what
Values disappear from my array :( HELP!
hey all, I have a lil mysql/php/apache script that queries a databaseand pulls put 5 integers.These 5 integers are then displayed in an HTML tableCode: [Select]<?php$i=0;global $Val_Store;while
Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. Is there a way that while the cache is being pulled out and then disappear once the cache is
quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows
Search with relational database
Hey,I have quite a complicated (for me anyway ) relational database for an apartments system I am developing.Keith (kickstart) was very helpful assisting me in creating the relationships and here is
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a new user when I'm not logged in. It should redirect me back to the login page but I get this
Renaming array keys
The issue: renaming array keys inside a foreach loop.I'm trying to build a pie chart image with the Google Chart API using information from a database. (I'm going to change the type of data I talk