tango while I agree with you, this only occurs if you have only one text input in your form and then a submit button. If you more than one text input hence your example it will send the post from the submit button.
Most forms will have way more than one input of type text but for those that don't yes you need to check for the post of a different field.
If you have more than one text/hidden field you can now for isset($_POST['submit']) or whatever your submit button may be named and it will work regardless of clicking on it with your mouse.
It does not work like I have mentioned if you use the hidden input as your second input. An example of what I mean
The following will pass in the post for the submit button.
PHP Code:
<html>
<head>
<title>The if(isset($_POST['submit'])) bug demo.</title>
</head>
<body>
<?php
if (isset($_POST['submit']))
{
print 'Your data was processed!<br><br>This is your $_POST submission:<br>';
print_r($_POST);
}
else
{
print 'No data processed.<br><br>This is your $_POST submission:<br>';
print_r($_POST);
}
?>
<br><br>
<form action="<?php print $_SERVER['PHP_SELF']; ?>" method="post">
Put the cursor in a box and press the enter key:<br>
<input type="text" name="sample" value="Some sample text.">
<input type="text" name="sample2" value="Some more text." />
<input type="submit" name="submit" value="Then the next time, click this">
</form>
</body>
</html>