Ok, right, just jazzing up my search feature for my catalogue, on the main catalogue department's output i have various descriptions of the product followed by an image (the link is stored in a field and called up out the output, this is placed inside img tags.
Im trying to do the same when outputting the search results but for some reason the image dont want to display.
Here is the code im using
as you can see it outputs each field as stated above, but because the user is not searching for the image url, i have just echo'd the image src undeneath the last search result code.
$image is the field with the URL stored for the image, it does work as i have my main catalogue linked up in the same way..
http://www.caldicot-pc-helpdesk.co.uk/fcv/database/index4.php
go on there, select dvd or video on the left, see the output with images showing, then search for comedy in the DVD table, see output with no images.
Im trying to do the same when outputting the search results but for some reason the image dont want to display.
Here is the code im using
Code:
while ($field = mysql_fetch_array($result))
{
echo '<div align="left" class="result">';
$searchResults = $field['catagory'];
echo '<b>Catagory: </b>';
echo $searchResults;
echo '<br>';
$searchResults = $field['title'];
echo '<b>Title: </b>';
echo $searchResults;
echo '<br>';
$searchResults = $field['certificate'];
echo '<b>Certificate: </b>';
echo $searchResults;
echo '<br>';
$searchResults = $field['price'];
echo '<b>Price: </b>';
echo $searchResults;
echo '<br>';
//IMAGE CODE//
echo '<img src='.$image.' />';
echo "</div>";
}
as you can see it outputs each field as stated above, but because the user is not searching for the image url, i have just echo'd the image src undeneath the last search result code.
$image is the field with the URL stored for the image, it does work as i have my main catalogue linked up in the same way..
http://www.caldicot-pc-helpdesk.co.uk/fcv/database/index4.php
go on there, select dvd or video on the left, see the output with images showing, then search for comedy in the DVD table, see output with no images.