so I am trying to do something in php based on what button a user presses in the html form.
<?php
if (isset($_POST["submit"])) {
echo "do this";
}else{
echo "do this instead";
}
?>
<form action ="Deliveryslot.php" method="post">
    <span class="em">
    <button type="submit" name = "em" value="1" > <img src="em.png" /></button>
    </span>
    <span class="em">
    <button type="submit" name = "ea" value="2" > <img src="ea.png" /></button>
    </span>
    <span class="em">
    <button type="submit" name = "la" value="3" > <img src="la.png" /></button>
    </span>
    <span class="em">
    <button type="submit" name = "e" value="4" > <img src="e.png"  /></button>
    </span>
    <span class="em">
    <button type="submit" name = "ln" value="5" > <img src="ln.png" /></button>
    </span>
</form>
How can I get the if statement at the top to respond to the values 1,2,3, etc..? So far I can't figure out why the submit function is not working in this code! I am showing it this way because I know this syntax is supposed to be correct and I am asking how I can change it to validate on the values.
 
     
    