?
Solved

Generation picture link

Posted on 2000-03-29
5
Medium Priority
?
176 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 120 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
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 if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

752 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