Jump to content

dougj

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dougj's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is exactly what I was looking for. It shows how to create an input tag with an image, identify it with a mysql record id and process that record id after the image is selected. Thought I\'d pass it on. It\'s from \"Kaif\" in another forum. Thanks, all. -------------------------------------------- While using the <INPUT TYPE=\"IMAGE\"> with the PHP, keep in mind that Internet Explorer 6 or earlier do not support the VALUE attribute if the INPUT TYPE is IMAGE. But if you are using Netscape or Mozilla then you can use the VALUE attribute. Hence you can not do this in Interent Explorer: print \"<input type=\"image\" name=\"imageView\" value=\"\". $row[0] . src=\"images/viewClient.gif\">\"; If you still want to do this in Intenent Explorer then you have to pass a Value to an Image with Hidden variable like: print \"<input type=\"hidden\" name=\"clientView\" value=\"\". $row[0] . \"\">\"; print \"<input type=\"image\" name=\"imageView\" src=\"images/viewClient.gif\">\"; And on the next script you can get the value of these variables by doing something like: $myArray = array(); $myArray = $HTTP_POST_VARS; print_r($myArray); for ($i=0; $i< count($myArray); $i++) { list($key, $value) = each($HTTP_POST_VARS); if (substr($key, 0, 5) == \"image\") { $image = substr($key, 5, -2); print \"<BR>image: \" . $image . \"<BR>\"; } } Hope this helps. --------------------------------------------------------
  2. I\'ve got a list of mysql records on a page (www.djenkins.nu/thoughts). I\'ve added images on each row of the form as <input type=\"image\"...>. I\'m not sure how to setup the input tag to be able to identify the mysql record id of the selected row nor how to recognize the record id when the submission is processed. Would I use an array with a value of the record id then when the form is submited, loop thru each array element to check which one was clicked? Thanks, in advance! doug P.S. Sorry if you don\'t agree with the thoughts I\'ve collected. Also, if I get this nailed down, I\'ll see about submitting a user tutorial on this - unless there already is one and I\'m too blind to see it!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.