On Mon, 29 Nov 2004 16:09:47 GMT, "kingofkolt"
<je**********@comcast.net> wrote:
"Dynamo" <Dy***********@newsguy.com> wrote in message
news:co*********@drn.newsguy.com... Not sure if this is a php or an html question but I'll post it anyway.
I have multiple thumbnail images on my catalogue page catalogue.php and
they are all hyperlinked to a single page called desc.php that will give an
enhanced description of the product selected.
I want the desc.php page to print the contents of a text file named ?.txt
based on which image was clicked on in my catalogue page.
example: if I click on 1.jpg in my catalogue then I want the file 1.txt to
be selected and printed on my description page.
I know how to print the contents of a textfile and I know how to disect
the strings of the filenames so that I can associate 1.txt with 1.jpg.
What I dont know is how to retrieve the name of the image file that was
clicked on the catalogue page within my script for the desc.php page
If I didn't use a hyperlink image and used a form submit button instead on
my catalogue page then of course I could use something like:
$filename = $_POST['filename']
Hope you understood all of that.
Regards
Dynamo
The easiest and most common method is to use $_GET to indicate the filename.
Other than that, I believe the only way to use an image the way you want to
use it, is to use it as a form submit button.
Depending on the code you use to load the image and build the
hyperlink around it, you'd simply add the name of the file to each
hyperlink as you build it:
<A HREF="desc.php?selected=1.jpg" SRC="1.jpg">
<A HREF="desc.php?selected=2.jpg" SRC="2.jpg">
for example.
--
gburnore@databasix dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division | Official Proof of Purchase
================================================== =========================
Want one? GET one!
http://signup.databasix.com
================================================== =========================