Re: image as submit
| From: | Matt McClanahan | Date: | Mon, 13 Nov 2000 19:08:33 +0000 |
| Subject: | Re: image as submit | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25014@lists.php.net to get a copy of this message | ||
On Mon, 13 Nov 2000, Jerry Lake wrote:
> Why is it that image submit buttons
> don't sent variables? I have a table
> of image thumbnails pull from a MySQL
> record set and I'd like to be able to
> click the thumbnails to get a template
> page with the full size imageNumber determined
> from the name of the thumbnail image
> any ideas?
It's a shortcoming of the HTML spec. It's annoying, but that's life. I
won't bother explaining how it works, since four people just did. It's
also quite a FAQ, so it should probably be added to the PHP FAQ if it
isn't there already.
In any case, it doesn't really sound like an image submit button is the
best solution here. If you're not using the form for much beyond
the image submit button, I'd simply use anchors.
<a href="viewfullimage.php?imageID=<?= $id ?>">
<img src="<?= $name ?>" border="0"></a>
would do just fine.
Matt