What are the best practices for passing parameters to PHP functions from buttons in a form?

When passing parameters to PHP functions from buttons in a form, it is best practice to use hidden input fields within the form to store the values that need to be passed. This ensures that the parameters are securely sent to the server without being visible to the user. By using hidden input fields, you can easily retrieve the values in the PHP script that processes the form submission.

<form method="post" action="process_form.php">
  <input type="hidden" name="param1" value="value1">
  <input type="hidden" name="param2" value="value2">
  <button type="submit" name="submit">Submit</button>
</form>
```

In the PHP script (process_form.php), you can access the parameters like this:

```php
$param1 = $_POST['param1'];
$param2 = $_POST['param2'];

// Call your PHP function with the parameters
yourFunction($param1, $param2);