portech Posted August 6, 2008 Share Posted August 6, 2008 I have a series of images, I want to retrieve the value of the image that is clicked. The first hidden input works fine, setting the action type to take the page to a certain location. I just want to retrieve the value of the image, the standard $_POST('freezer') method does not seem to be working. Is there any way to group the images? $content.="<td><input type=\"hidden\" name=\"action\" value=\"freezer\"><input type=\"image\" src=\"".$freezers[$counter].".jpg\" name=\"freezer\" value=\"".$freezers[$counter]."\" width=\"100\" height=\"100\"> </td> "; Link to comment https://forums.phpfreaks.com/topic/118430-retrieving-values-from-images/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 6, 2008 Share Posted August 6, 2008 To use an input type="image" in all browsers, read this - http://www.php.net/manual/en/faq.html.php#faq.html.form-image The HTML standard only requires that an input type="image" send the current value when it is clicked. The current value is defined as the y and x coordinates it was clicked at. Any use of the value="...." parameter is open to browser dependent interpretation and cannot be relied on. Link to comment https://forums.phpfreaks.com/topic/118430-retrieving-values-from-images/#findComment-609763 Share on other sites More sharing options...
portech Posted August 7, 2008 Author Share Posted August 7, 2008 OK thanks, but what if I was to rely on it? This will only be used as an internal application on internet explorer. Link to comment https://forums.phpfreaks.com/topic/118430-retrieving-values-from-images/#findComment-610512 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.