Solved

Generation picture link

Posted on 2000-03-29
5
166 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

730 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