Default image
In making a file upload optional, when someone decides not to upload a file, is there a way to make the display page appear without that broken gif image? Maybe with words that say, "image not provided" - something like that....
Answer
DISCLAIMER:
This is extra complimentary content which purpose is to show additional usage that is not part of the product, i.e. it suggests tips for extending the functionality of the product by the users themselves.
It is provided "as is", without warranty of any kind, express or
implied , including but not limited to the warranties of
merchantability, fitness for a particular purpose and nonfringement of
third party rights.
DMXzone does not take responsibility to
support the suggested content to be fully compatible and working as
intended and does not provide support for extended functionality which
is not included in the current release of the extension.
It is highly recommended that only more advanced developers use it.
Try the following code:
<?php if ($row_myRecordset['ImageFileName'] <> "") {
echo "<IMG src="/upload/$row_myRecordset['ImageFileName']">";
} else { // no image
echo "Image Not Provided";
} ?>
Comments
Won't work
Default image wo'nt work
Ca'nt get this script to work please explain
This works!
This works (See above)
You must me logged in to write a comment.