hmm,I am not sure what you mean by accessing the variable name.
if each line is a form, whose action is the same script, then you don't need to do anything with that. IF you are using <form></form> tags
If you are simply building an href link to use the GET method (which is what it is looking like above) then you just need to be careful about how you build it.
inside your <? ?> tags, you have to use print to output anything to the browser.
Double quotes (" ") will evaluate anything that lloks like a variable inside them, but it won't properly evaluate $arrayname[] type variables. Those MUST be outside the quotes (using the concatenation operator ('.')
The php code that you submitted above:
<? $php_self?qty=$qty$dbarray["artid"]; ?>
looks completely wrong.
If this is the style of tag you are trying to generate, it should be done like this:
<a href="<?
print "$PHP_SELF?qty=$qty" . $dbarray["artid"];
?> >
Look closely at where i have placed the double quotes. I put 2 variables ($PHP_SELF and $qty) inside the double quotes, because they are simple variables. But the keyed array is concatenated outside the quotes so that it will be properly evaluated.
You original code would have output an <a> tag that looked like this:
<a href="
NOW, for the next problem,
wrapping that <a> tag around an <img> tag will give you a graphical button, that submits whatever the dynamic qty is, but it won't post your <input> fields.
what you need to do is get rid of the <a> tag.
If you want that <input> tag value to be submitted, you need to put in some <form> tags
the method="post" the action="nameofform.php"
you don't need anything dynamic in the <form tag>
to make an image button you need to use this
<input type="image" name="<doesn't really matter>" src="<location of graphic file">
That is the proper way to make an image button
Any input of type image, will cause a form submission of whatever form it is within.
So remember, every <tr> should start like this:
<form method="post" action="yourscript.php"><tr>
and end like this
</tr></form>
Hope this helps!!
If you are still having problems with it,
post the snippet that generates the table, and i will check your PHP syntax.
Cheers!