Generation picture link

I have a variable and I want to
display a picture with $var.gif name

What should I do?
crow_nvAsked:
Who is Participating?
 
maneshrConnect With a Mentor Commented:
what will the user search on?? what type of DB is it (textual or some commerical DB)??

how is the data stored?

pl. let me know
0
 
maneshrCommented:
if you are using PERL, this is how you do it.

#!/usr/local/bin/perl

$var="butterfly";

print "Content-type: text/html\n\n";
print "<img src=\"$var.gif\">\n";

0
 
crow_nvAuthor Commented:
How should I make path to pictures?
I have problems with " and \ .
Thank you.
0
 
maneshrCommented:
Ok. let say your web servers root is...

/www/server_root

& your images are in .../www/server_root/images

so the full path to butterfly gif is /www/server_root/images/butterfly.gif

then your print statement would be ...


#!/usr/local/bin/perl

$var="/images/butterfly.gif";

print "Content-type: text/html\n\n";
print "<img src=\"$var\">\n";

and your image should be displayed on screen!!
0
 
crow_nvAuthor Commented:
We have simple database and html search on it. So i want to display a picture with the search results.
picture's name is IDnumber.gif . How i can do this. Can you help? Thank you!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.