Thanks for all the help everyone
I'm still having trouble, I suspect with this line:
Code: Select all
$img = returnImage("image_user_uploaded(if_any).jpg", "images/");
Specifically, if I put in temp.jpg or image_user_uploaded(if_any).jpg or whatever.jpg as the name changes with each listing. Every time someone uploads a file, it has the name format of 19_img.jpg where '19' changes to whatever number listing they happen to be. This number is dynamic.
For clarification, the user uploaded image goes to the folder /images/com_sobi2/clients/
I've also placed the nopic.gif image in this folder to simplify things.
So I'm this far right now:
Code: Select all
<?php
function returnImage($imgName, $path)
{
$fullPath = $path.$imgName;
if (($imgName != "") && file_exists($fullPath))
return $fullPath;
else
return $path."nopic.gif";
}
$img = returnImage("dynamicimagenameplaceholdershouldgoherebutIdontknowwhatthatis", "images/com_sobi2/clients/");
?>
<div>
<img src="<?php echo $img; ?>">
</div>
Thanks again,