RE: [PHP] Unusual Form situation?
| From: | SpyProductions Support Team | Date: | Wed, 27 Feb 2002 20:19:44 +0000 |
| Subject: | RE: [PHP] Unusual Form situation? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86473@lists.php.net to get a copy of this message | ||
Thanks for the help!
Those output variables are pretty interesting - I didn't know that image
maps could be built in PHP with relative ease. :)
So I learned two things for the price of one.....
:)
-Mike
> -----Original Message-----
> From: Sam Masiello [mailto:smasiello@synacor.com]
> Sent: Wednesday, February 27, 2002 1:48 PM
> To: support@spyproductions.com; php-general@lists.php.net
> Subject: Re: [PHP] Unusual Form situation?
>
>
>
> I assume that you are doing something like this for your image:
>
> <input type="image" src="path/to/image/image.gif" border="0"
> name="myimage">
>
> Given that, PHP gives you $myimage_x and $myimage_y which
> correspond to the
> X and Y coordinates that were clicked on the image from the user.
>
> So on the page that your form submits to, you can do the following:
>
> if (isset($myimage_x) || isset($myimage_y)) {
> // do something
> }
>
> If the image was clicked, this will submit your form, and both $myimage_x
> and $myimage_y will be set.
>
> HTH
>
> Sam Masiello
> Software Quality Assurance Engineer
> Synacor
> (716) 853-1362 X289
> smasiello@synacor.com
>
>
> ----- Original Message -----
> From: "SpyProductions Support Team" <support@spyproductions.com>
> To: <php-general@lists.php.net>
> Sent: Wednesday, February 27, 2002 1:33 PM
> Subject: [PHP] Unusual Form situation?
>
>
> >
> > I have form I am working with and trying to add some PHP
> processing to the
> > form's contents.
> >
> > The form is a html template used by a CGI script.
> >
> > So, instead of having a 'submit' button for the form's content,
> there is a
> > GIF. The CGI apparently reads the GIF as a button to submit the form's
> > content and move on.
> >
> > How would I go about getting php to recognize this GIF as such?
> Typically
> > for forms I use:
> >
> > if ($submit) { blah, blah, blah }
> >
> > Would I use if ($gifname)? Would the the GIF's name be the ALT
> tag? Or am
> I
> > going to have to sift through the arcane CGI to find some action?
> >
> > Can I make the PHP come to life using the ACTION section of the form
> (which
> > only refers to the CGI right now)?
> >
> > Thanks,
> >
> > -Mike
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>