I can't figure out why...
This works:
<?php
if($_POST['test']) echo "posted";
?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="submit" name="test" />
</form>
and this doesn't:
<?php
if($_POST['test']) echo "posted";
?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="image" name="test" src="images/button.submit.png" />
</form>
When you post via an image the x/y coordinates that were clicked on are sent instead. Check $_POST['test_x']
and $_POST['test_y']
Image inputs only post the x and y co-ordinates of where the click happened, not (necessarily) a value. If you really want to use an image in this way, you may want to add a hidden field too.