Image in form

I need an form like this, each lock.gif send an id value alongwith hidden field “do”:

<form method=“get” action=“download.php”>
<input type=“hidden” name=“do” value=“something” />
<input type=“image” name=“id” value=“6” src=“lock.gif” alt=“” />
<input type=“image” name=“id” value=“7” src=“lock.gif” alt=“” />

By clicking the first image I expect to have this:
but I just get this:

If instead, I use:
<form method=“post” action=“download.php”>
<input type=“hidden” name=“do” value=“something” />
<input type=“hidden” name=“id” value=“6” />
<input type=“image” src=“lock.gif” />

Of course it works, but problem is that the value of “id” is fetched from db, and this form will be created in foreach the db query array, and each row has its own “id”, so if I use the form above in <tr> field, however it works but cannot be W3 validated as <form> should be outside <table> this is why I need something like the first one that I can put the form tag outside table tag and in each row just have the image to submit them W3 validated. Please help for this.

Any advice yet?

It’s not really clear what you are asking or what the issue is. You obviously can’t have the same name value on multiple elements. You can wrap input in divs etc. if needed.

I ask how is possible to use an image/icon to submit a value in form? I am not talking abput submit button but using type=image, in a form to pass a value?

No idea yet?

just so you know: testing ( safari/FF on mac) your code I do get:


what browser are you using?

Did you test it with more than one image in the same form and by clicking each of them you got appropriate id in url? Please let me know this.
I tested it with IE, what did you test it with?