Skip to content Skip to sidebar Skip to footer

Html Form Not Working With Image Submit Button?

I have the following html form i am testing out.
will not be available, but $_POST['submit_x'] and $_POST['submit_y'] will be defined (containing the X/Y coordinates where the image was clicked on).

Solution 2:

Just add this inside the form:

<inputtype="hidden" name="submit" value="submit"/>

So that it receives the $_POST['submit'] in your PHP.

Solution 3:

<inputtype = "image" src = "uploads/defb.png"  name = "submit" value = "submit"/>

change to:

<inputtype = "submit"  name = "submit" value = "submit"/>

Because input didint have this type

create style for input HTML

<inputtype = "submit"  name = "submit" value = "submit"id="button" />

CSS

#button {

background:url("uploads/defb.png");
border:0;
outline:0;

}

Post a Comment for "Html Form Not Working With Image Submit Button?"