Could anyone tell me how to change the text that is associated to an image as I am totally stuck?
function renderListingsMainImageJava($listingID)
{
// shows the main image
global $conn, $lang, $config, $style;
// grab the images
$listingID = make_db_extra_safe($listingID);
$sql = "SELECT ID, caption, description, file_name FROM " . $config['table_prefix'] . "listingsImages WHERE (listing_id = $listingID) ORDER BY rank LIMIT 0,1";
$recordSet = $conn->Execute($sql);
if ($recordSet === false)
{
log_error($sql);
}
$num_images = $recordSet->RecordCount();
if ($num_images > 0)
{
while (!$recordSet->EOF)
{
$file_name = make_db_unsafe ($recordSet->fields['file_name']);
$caption = make_db_unsafe ($recordSet->fields['caption']);
$description = make_db_unsafe ($recordSet->fields['description']);
echo "<center><img src=\"$config[listings_view_images_path]/$file_name\" width=\"440\" name=\"main\"></center>";
if ($description == "")
{
$description = 'Listing #'.$file_name.'';
}
echo "<b>$description</b><br><br>";
$recordSet->MoveNext();
} // end while
} // end if ($num_images > 0)
} // end function renderListingsMainImageJava
function renderListingsImagesJava($listingID)
This is the function:
echo "<SCRIPT Language=\"JAVASCRIPT\"> function imgchange(name){if(document.images){document.main.src = \"$config[listings_view_images_path]/\" + name; } else { document.main.src = \"images/nophoto.gif\"; }}</SCRIPT>";
Any help please