RE: [PHP] <input type = image ... >

From: Date: Mon, 06 Nov 2000 17:09:07 +0000
Subject: RE: [PHP] <input type = image ... >
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23922@lists.php.net to get a copy of this message
Terrific! It works. Thanks. -- Russ Abbott | -----Original Message----- | From: Sam Masiello [mailto:smasiello@chekinc.com] | Sent: Monday, November 06, 2000 8:24 AM | To: RAbbott@calstatela.edu; php-general@lists.php.net | Subject: RE: [PHP] <input type = image ... > | | | | You should be able to do something like this: | | In your INPUT tag: | <INPUT TYPE="image" ... ... ... ... NAME="myimage1"> (do not include the | VALUE attribute) | | then in the page that your form submits to: | | if (isset($myimage1_x)) { | do something useful or possibly not quite so useful; | } | | Since your input type is an image, the _x addition to what you named your | input image is implied. From what I understand the $myimage1_x variable | will be set to the x coordinate where the user clicked on the image. | Someone can chime in and correct me if that is wrong though....in either | case, you merely need to check if that variable is set....you | shouldn't need | its value. | | HTH | | Sam Masiello | System Analyst | Chek.Com | (716) 853-1362 x289 | smasiello@chekinc.com | | -----Original Message----- | From: Russ Abbott [mailto:RAbbott@CalStateLA.edu] | Sent: Monday, November 06, 2000 10:30 AM | To: php-general@lists.php.net | Subject: [PHP] <input type = image ... > | | I'd like to use a tag such as <input type=image name=n value=v> | to pass v as a value of $n, but it doesn't seem to work. | | I have this tag inside a form, and clicking on the image does trigger | the program pointed to by the form, but $n is not bound to anything. | (Other <input ... > tags have their values posted properly.) | | If I change type=image to type=submit, a button is generated and $n | is bound to v as expected. Is there some way to substitute an image | for a button and associate data with the image? | | I want to have a group of images, each with a different data value, | and then have the program be told which image was clicked. | | Thanks. | | -- Russ Abbott |

« previous php.general (#23922) next »