Solved

Generation picture link

Posted on 2000-03-29
5
155 Views
Last Modified: 2013-12-25
I have a variable and I want to
display a picture with $var.gif name

What should I do?
0
Comment
Question by:crow_nv
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:maneshr
Comment Utility
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
 

Author Comment

by:crow_nv
Comment Utility
How should I make path to pictures?
I have problems with " and \ .
Thank you.
0
 
LVL 16

Expert Comment

by:maneshr
Comment Utility
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
 

Author Comment

by:crow_nv
Comment Utility
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
 
LVL 16

Accepted Solution

by:
maneshr earned 30 total points
Comment Utility
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now