Here's my code in sub build_html_record_form:
$image_1 = "<tr><td align=right valign=top width=20%><$font>Image 1:</font></td><td width=80%><img src=\"$upload_directory_url/$rec{$db_key}/$rec{'Imagename_1'}\"></td></tr>\n"
}
if ($rec{'Imagename_2'}) { # Display image two
$image_1 .= "<tr><td align=right valign=top width=20%><$font>Image 2:</font></td><td width=80%><img src=\"$upload_directory_url/$rec{$db_key}/$rec{'Imagename_2'}\"></td></tr>\n"
}
if ($rec{'Imagename_3'}) { # Display image three
$image_1 .= "<tr><td align=right valign=top width=20%><$font>Image 3:</font></td><td width=80%><img src=\"$upload_directory_url/$rec{$db_key}/$rec{'Imagename_3'}\"></td></tr>\n"
}
else {
$image_1 = "";
}
Further on in the same sub the above code is called with: $output .= qq~$image_1~;
Situation: If I upload 2 or 3 images, they display in the admin validation form fine using both 'add validation' or 'admin modification'. If I load upload just one pic, it does not show. The image name is in the correct db position in all cases, so no problem there. Wierd: if in 'admin modification' I put ANYTHING in the other imagename fields via admin modify (like, just one letter, not through the upload form), then the lone image will display as it should. I have tried dozens of variations of the code, and always get the same result. Driving me crazy!!
The image IS uploaded, and will show on the site page (via link.html), if I validate the addition, even though I can't see the picture in admin.
HELP!
Leonard
aka PerlFlunkie
Code:
if ($rec{'Imagename_1'}) { # Display image one $image_1 = "<tr><td align=right valign=top width=20%><$font>Image 1:</font></td><td width=80%><img src=\"$upload_directory_url/$rec{$db_key}/$rec{'Imagename_1'}\"></td></tr>\n"
}
if ($rec{'Imagename_2'}) { # Display image two
$image_1 .= "<tr><td align=right valign=top width=20%><$font>Image 2:</font></td><td width=80%><img src=\"$upload_directory_url/$rec{$db_key}/$rec{'Imagename_2'}\"></td></tr>\n"
}
if ($rec{'Imagename_3'}) { # Display image three
$image_1 .= "<tr><td align=right valign=top width=20%><$font>Image 3:</font></td><td width=80%><img src=\"$upload_directory_url/$rec{$db_key}/$rec{'Imagename_3'}\"></td></tr>\n"
}
else {
$image_1 = "";
}
Further on in the same sub the above code is called with: $output .= qq~$image_1~;
Situation: If I upload 2 or 3 images, they display in the admin validation form fine using both 'add validation' or 'admin modification'. If I load upload just one pic, it does not show. The image name is in the correct db position in all cases, so no problem there. Wierd: if in 'admin modification' I put ANYTHING in the other imagename fields via admin modify (like, just one letter, not through the upload form), then the lone image will display as it should. I have tried dozens of variations of the code, and always get the same result. Driving me crazy!!
The image IS uploaded, and will show on the site page (via link.html), if I validate the addition, even though I can't see the picture in admin.
HELP!
Leonard
aka PerlFlunkie