Button Image and name or value problem

Today I had a problem with image button in my form.

I had the following line:
<input name=”blabla” type=”image” src=”http://domain.com/pict.gif”>

Quickly I realised image button (used instead of submit) does not send information about “blabla”. Also, there is another problem (only under IE). If you try to use attribute “value” it will not work.

Image attribute in form sends ONLY coordinates of clicked place on image. Example:

$_POST[‘blabla_x’] === ’83’
$_POST[‘blabla_y’] === ‘178’

Variables have been created by adding _x and _y to attribute “blabla” from our form.

To detect the form was sent we mast use the following line:

if ($_POST[‘bin_x’])
{here manage your data from form}

Leave a Reply

Your email address will not be published. Required fields are marked *

Change the CAPTCHA codeSpeak the CAPTCHA code

This site uses Akismet to reduce spam. Learn how your comment data is processed.