either
//html form:
<input type="image" NAME="buy" value="Buy">
<input type="image" NAME="sell" value="Sell">
//variable handling
if (isset($buy)) {
//...
}
elseif (isset($sell)) {
//...
}
or
//html form:
<input type="image" NAME="buy" value="Buy">
<input type="image" NAME="buy" value="Sell">
//variable handling
switch ($buy) {
case "Buy":
//...
break;
case "Sell":
//...
break;
default:
break;
}
make sure to check the cases! (Buy != buy)