Hmm, what'cha mean? Like this?
http://www.vormund.net/eg/buysell.php
Click the button, and it'll be echoed out along with the text box. So then you could do a simple
PHP Code:
if ( $_POST['butonName'] ) {
// do this
} else {
// do this
}
The code behind buysell.php is very simple:
PHP Code:
<?php
foreach( $_POST as $var => $val )
echo $var.":".$val."<br>";
?>
<form action="<?= $_SERVER['PHP_SELF'] ?>" method="post">
<input type="text" name="stuff"><br>
<input type="submit" name="buy" value="Buy">
<input type="submit" name="sell" value="Sell">
</form>
I guess the bottom line is by putting a name on the submit tag, it'll show up as a variable, too.