What is the method for resetting a button control in PHP?

In PHP, you can use the input element with type=”reset” to create a reset button. When the user clicks the reset button, all input fields in the form will be reset to their initial values.

The sample code is shown below:

<form>
  <input type="text" name="username" value="John Doe">
  <input type="password" name="password" value="password123">
  <input type="reset" value="Reset">
</form>

In the example above, when the user clicks the reset button, the username and password input fields will be reset to their initial values (“John Doe” and “password123”).

bannerAds