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), we indicate that the user is now editing the tour with the given ID.

Get hands-on with 1200+ tech skills courses.