How can hidden input fields be used in PHP forms to pass sensitive data?

Hidden input fields can be used in PHP forms to pass sensitive data by including them in the form but not displaying them to the user. This allows the data to be sent along with the form submission without the user being able to see or modify it. However, it's important to note that this method is not completely secure as the data can still be accessed by viewing the page source or using browser developer tools.

<form method="post" action="process_form.php">
  <input type="hidden" name="secret_key" value="sensitive_data_here">
  <!-- Other form fields here -->
  <input type="submit" value="Submit">
</form>