Gossamer Forum
Home : General : Perl Programming :

Poke me in the eye, I don't see the problem!

Quote Reply
Poke me in the eye, I don't see the problem!
Here's my code in sub build_html_record_form:

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! Crazy w00t


Leonard
aka PerlFlunkie
Subject Author Views Date
Thread Poke me in the eye, I don't see the problem! PerlFlunkie 4799 Dec 7, 2009, 11:19 PM
Thread Re: [PerlFlunkie] Poke me in the eye, I don't see the problem!
Andy 4662 Dec 8, 2009, 12:25 AM
Post Re: [Andy] Poke me in the eye, I don't see the problem!
PerlFlunkie 4635 Dec 8, 2009, 1:52 PM