Do some testing in a few browsers to see what happens when the user hits "enter" or "return", rather than clicking on the button(s)... I *think* you need to put in a hidden element. For example, if you wanted "submit2" to be the default value:

<?=$_POST[submit]?>
<form method="post">
        <input type="hidden" name="submit" value="submit2" />
        <input type="submit" name="submit" value="submit1" />
        <input type="submit" name="submit" value="submit2" />
</form>


Justin




On Friday, August 1, 2003, at 02:36 PM, hu zhenghui wrote:

You can get the button value use code below:

<?php echo $_POST[submit];?>
<form method="post">
<input type="submit" name="submit" value="submit1">
<input type="submit" name="submit" value="submit2">
</form>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to