Solved

Generation picture link

Posted on 2000-03-29
5
159 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
ID: 2666571
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
ID: 2669516
How should I make path to pictures?
I have problems with " and \ .
Thank you.
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2669611
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
ID: 2672311
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
ID: 2673492
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
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…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

895 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

18 Experts available now in Live!

Get 1:1 Help Now