Editing Tour Data

Finally, let's implement the functionality of editing tour data.

Differences between editing and creating tours

Here are some differences between edit-tour.php and create-tour.php:

  • In edit-tour.php, we have a tour ID provided as a query parameter. We put it inside a variable so we can use it later. When there is no id query parameter, it is technically a bad request, so we might show an error page, but for now, we just redirect the user to the list of tours.
  • In the title of the page (the <h1> element),
...
Access this course and 1400+ top-rated courses and projects.