Re: classifieds problem
by "Keith D Sellars" <Keith(at)webgraffix.com>
|
| Date: |
Fri, 18 Apr 2003 13:00:18 -0400 |
| To: |
<hwg-basics(at)hwg.org> |
| References: |
riveraamd 2 |
| |
todo: View
Thread,
Original
|
|
Lori,
Don't know the exact coding in perl, but the concepts should be similar:
In php, you could use "if" and "elseif"statements:
if (img_name == "img_one") {
echo "img src=\"$graphics_dir/img_one\";
}elseif {
(img_name == "img_two") {
echo "img src=\"$graphics_dir/img_two\";
}
I just coded this from the top of my head, but it should work (in php). The
above is somewhat limited in that if you have a LOT of images possible, then
the coding could get somewhat complex. In such a case, you could then
create a variable before this function whose value would be the image name
based upon whatever conditions requires the image. This variable would then
replace the "img_one" above, with the elseif statement not even necessary.
Anyway, maybe someone that is a little more versed in perl can use the same
concept to create the correct code.
Thanks,
Keith D Sellars
WebGraffix
www.webgraffix.com
"Making database sites seem easy"
----- Original Message -----
From: "Lori Eldridge" <lorrie652(at)icehouse.net>
To: "Tim Rivera" <lists(at)timrivera.com>
Cc: <hwg-basics(at)hwg.org>
Sent: Friday, April 18, 2003 12:06 PM
Subject: Re: classifieds problem
> Hi tim,
>
> I thought of that but the horse image is not static like the
camera.gif--it changes according to whichever horse is being pulled up, and
thus it will take more code than this and maybe changing another doc.
>
> thanks for trying to help.
> Lori
>
> >Hello Lori,
> >
> >> Is there anyone that can tell me how to change the following code
> >> for a static camera gif to a horse thumbprint
> >>
> >> print qq~<img src="$graphics_dir/smallcamera.gif" width=16 height=12
> >> border=0 alt="small camera icon" align=middle>~;
> >
> >I think that is the line you need to edit. Just change "smallcamera.gif"
to
> >your horse image (as long as it is in the same directory,) and modify the
> >width, height, and alt values.
>
>
>
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.