I tried this (found in alternate image post 1167) and when I try to access the add/view/delete/modify... I get the popup box that says I've started to download a file!
Here's what I put and where:
# Full path and file name of the html routines.
require $db_script_path . "/html.pl";
# Full path and file name of the default photo.
$default_photo = "http://www.amix.com/homefinder/fsbos/photos/default.jpg";
$photo_path = "/opt2/amix/httpd/htdocs/homefinder/fsbos/photos"; #no trailing slash!
if (-e "$photo_path/$rec{'photo'}") {
print qq|<img src="http://www.amix.com/homefinder/fsbos/photos/$rec{'photo'}">|;
}
else {
print qq|<img src="$default_photo">|;
}
What goes in the add/search forms to have this field to search for the uploaded file and if it's not available insert the default image?
Here's what I put and where:
# Full path and file name of the html routines.
require $db_script_path . "/html.pl";
# Full path and file name of the default photo.
$default_photo = "http://www.amix.com/homefinder/fsbos/photos/default.jpg";
$photo_path = "/opt2/amix/httpd/htdocs/homefinder/fsbos/photos"; #no trailing slash!
if (-e "$photo_path/$rec{'photo'}") {
print qq|<img src="http://www.amix.com/homefinder/fsbos/photos/$rec{'photo'}">|;
}
else {
print qq|<img src="$default_photo">|;
}
What goes in the add/search forms to have this field to search for the uploaded file and if it's not available insert the default image?