I went to http://www.jpdeni.com/dbman/Mods/file-upload.txt to allow users to upload their photos along with their profile. Everything works well (the graphic gets put to the directory, etc), except I don't understand where to put this:
|; # to close off a previous print qq| statement
$ALLOWED_EXT =~ s/\\.//g;
$ALLOWED_EXT =~ s/\$//g;
@extensions = split (/\Q|\E/o,$ALLOWED_EXT);
GRAPHIC: foreach $extension (@extensions) {
if (-e "$SAVE_DIRECTORY/$rec{$db_key}.$extension") {
print qq|<img src= "$SAVE_DIRECTORY_URL/$rec{$db_key}.$extension">|;
last GRAPHIC;
}
}
print qq|
You can run the script at http://www.andrews.edu/...man/db.cgi?db=alumni and you can see my html.pl file at http://www.andrews.edu/AIM/alumni.txt . Where would I add that perl code to the html.pl file for the graphic to appear above the right record? Thanks for your help.
Nelson
Code:
### Wherever you want your graphic to print out, use the following: |; # to close off a previous print qq| statement
$ALLOWED_EXT =~ s/\\.//g;
$ALLOWED_EXT =~ s/\$//g;
@extensions = split (/\Q|\E/o,$ALLOWED_EXT);
GRAPHIC: foreach $extension (@extensions) {
if (-e "$SAVE_DIRECTORY/$rec{$db_key}.$extension") {
print qq|<img src= "$SAVE_DIRECTORY_URL/$rec{$db_key}.$extension">|;
last GRAPHIC;
}
}
print qq|
You can run the script at http://www.andrews.edu/...man/db.cgi?db=alumni and you can see my html.pl file at http://www.andrews.edu/AIM/alumni.txt . Where would I add that perl code to the html.pl file for the graphic to appear above the right record? Thanks for your help.
Nelson