I am currently working on a web site whereI want to use images (buttons) to submit forms.
All is fine using the method below:
.......
echo "<form name=\"myform\" action=\"$PHP_SELF\" method=\"post\">";
echo "<input type=\"image\" name=\"imagename\" src=\"imagesrc\">";
echo "<input type=\"hidden\" name=\"submit\" value=\"somevalue\">";
echo "</form>";
........
The trouble begins when I use more than one image button within the form. I know that the variable submit is given the value 'somevalue' and is then passed back to $PHP_SELF, but what can I do if I have three buttons which should act logically as ORs , i.e. I have three choices and only want to select one. I will then do one of three things based on the choice made.
I know I can't use three different hidden variables because they will all receive the values placed in the 'value' tag.
Any ideas?
PS I'm not adverse to using PERL if I have to, but I would prefer not to have to resort to javascript.
Cheers
david