What best practice can be implemented to prevent premature execution of PHP scripts when using form submission buttons?

To prevent premature execution of PHP scripts when using form submission buttons, one best practice is to check if the form has been submitted before executing any PHP code. This can be done by checking if the form submission button has been clicked using the isset() function in PHP.

if(isset($_POST['submit_button'])) {
    // PHP code to process form data goes here
}