PHP + MySQL + HTML + Os Commerce
Displaying a long list with images. There is many pages which are paginated. The images in the one case are stored on the server and therefore the path is used when displaying it. But what I need to do is display some images which are not stored on the server. Their online url is stored in a column in the database and I need to use it to display these images.
This line is for the images that display correctly by their path on the server.(in PHP file)
$image=tep_image(FILENAME_IMAGE."?image_name=".PATH_TO_IMAGE.$row['image_url']."&size=120");
Here is an example of what I have been trying to use for the url situation and the images I want to show by there url have a unique id which I use to know when to use a different method of displaying than the above code.(in PHP file)
$image= '<img src="'.$row['image_url']'." width="120" height="120" alt="image"/ >';
$row is a row got from a query of all the columns and tables in the db that is needed. This code is also in a while loop so it does everything for each image.
This is the html to display the image_url variable that is in an array called search_result in a PHP file.But this code is from the html file.
<div class="table-row">
<div class="table-cell image">
{search_result.image_url}
</div>
This is what shows up for inspect element for the images that use tep_image and are stored on this server. So a path to the folder on this server with the filename is used to get the currect image in this case. I tried to do this method for the online url images by just putting it in instead of the path to the image but it's tricky.
This is the way the other part with td tags should be displaying but for some reason is showing completely different html than these pages.
<div class="table-cell image">
<img src="http://blah.com/image.php?image_name=image/123image.jpg&size=120"border="0" alt="" >
</div>
This is what shows up on pages where I try to display the images by their online url.
<tbody><tr>
<th>IMAGE</th>
<th>JOE</th>
<th>WHERE</th>
<th>SUBMIT</th>
</tr>
<tr>
<td class="image">//the html to display the image should be here***or the td tags shouldnt be showing up and it should be the div like above code***</td>
<td class="description">
<div class="name">joe</div>
<p>blah</p>
</td>
I would be very grateful to whoever can shed as much light on any of the code above and any advice on this problem would be very appreciated. I'm really confused and frustrated with this and for me its very complex compared to what I'm used to. Please try and be as clear as possible.Thanks.