E' bruttissimo ma non ho resistito a postarlo

Codice PHP:
<?php
if (!empty($_POST)) {
    echo 
substr(key($_POST), 0strlen(key($_POST)) - 2);
}
?>
<form action="index.php" method="post"> 
    <input type="image" name="image1" src="smile.jpg"> 
    <input type="image" name="image2" src="smile.jpg"> 
</form>