Re: Using custom "button" form element instead of standard "submit"?
| From: | Durwood Gafford | Date: | Thu, 30 Jan 2003 18:17:07 +0000 |
| Subject: | Re: Using custom "button" form element instead of standard "submit"? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133682@lists.php.net to get a copy of this message | ||
"1lt John W. Holmes" <holmes072000@charter.net> wrote in message
>
> If that's what you want, then just make each button a normal <a href> link
> and pass an variable to the next page in the link (like someone has
already
> suggested). You'd get the same end result.
>
> <a href="page.php?sample=a"><img></a>
> <a href="page.php?sample=b"><img></a>
> <a href="page.php?sample=c"><img></a>
> <a href="page.php?sample=d"><img></a>
>
> print "The user selected button $sample<br>\n";
Indeed this solution does appear to be the best in that it does not rely on
client-side scripting, it allows for control of the icon/button appearance,
and it allows direct access to the "value" associated with the selected
button. I had hoped to use POST instead of GET, however -- i didn't want to
pass the information via the URL.
To make the issues more clear (assuming everyone's not totally burned out
thinking about this one), I will submit links to working, example code in a
followup post. I'm swamped with a proposal i'm working on for my 'day' job,
however -- so stay tuned.
thanks for all of the insights/assistance!
-Durwood