Re: [PHP] Unusual Form situation?

2002-02-27 Thread Sam Masiello


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
[EMAIL PROTECTED]


- Original Message -
From: SpyProductions Support Team [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Unusual Form situation?

2002-02-27 Thread SpyProductions Support Team


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:[EMAIL PROTECTED]]
 Sent: Wednesday, February 27, 2002 1:48 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 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
 [EMAIL PROTECTED]


 - Original Message -
 From: SpyProductions Support Team [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 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
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php