Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to insert an image on a web page through a CGI script

Status
Not open for further replies.

alternate

Programmer
Jan 22, 2008
1
GB
Hi

I need to insert an image at the top of the page through the following script. I am pasting a part of the script.



#!/usr/bin/perl -w

use CGI qw/:standard/;

use mimp;


print header,
start_html('Mapping Database Query Interface'),
"<center>",
"<marquee width=300 height=50> <img src = rail.bmp> </marquee>",
"&nbsp;&nbsp;&nbsp;&nbsp;",

h2("<marquee bgcolor=orange><blink>Mapping Database Query Interface</blink></marquee>"),
"<br",

"<br>",
start_form,
"Enter Query One ",
textfield(-name=>'queryone', -size=>30),
" with ",
popup_menu(-name=>'option', -values=>['expression_type_Landrace','expression_type_Pietran','expression_type_between_breed','score','mapped_with_score','mapped','gene_location']),
"&nbsp;&nbsp;&nbsp;&nbsp;",
"<center>",
"<br>",
"Enter Query two with query one if required ",

textfield(-name=>'querytwo', -size=>30),
submit,
"<br>",

"</center>",
end_form,
start_form,
submit(-value=>'Submit BLAST',-name=>'blast'),
end_form,
"<br>",

hr;

 
<marquee width=300 height=50> <img src = rail.bmp> </marquee>",
"&nbsp;&nbsp;&nbsp;&nbsp;",

if your talking about that line you need to provide the full path to the rail.bmp file like /images/rail.bmp or /rail.bmp or where ever it happens to be

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
don't store images in the cgi-bin folder and expect them to display if that is what you are doing. Most cgi-bins block access to anything but scripts. Move images to a folder and use the correct path to that folder realtive to the folder the script is in.


------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top