Steps to create the edit tour script

The edit-tour.php script can make use of the id query parameter to determine which tour should be edited. This query parameter will be available as $_GET['id']. With this information, we can take the following steps:

  • Load the data for the tour with the given ID.
  • Show the data in the form.
  • When the user has submitted the form, we normalize the data, validate it, and then save the updated data.

Get hands-on with 1200+ tech skills courses.