<input type="image"> doesnt seem to be posting.

Posted by Derek Adair on Stack Overflow See other posts from Stack Overflow or by Derek Adair
Published on 2010-04-10T23:50:12Z Indexed on 2010/04/10 23:53 UTC
Read the original article Hit count: 284

Filed under:

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>

© Stack Overflow or respective owner

Related posts about form-submission