What do you do when you detect your get request is broken or is passing wrong types of data? Say you have a forum-page.php?forum=3 that lists all the topics related to forum 3.
What would be a good way to deal with the absence of the "forum" variable? What about if instead of being an integer, you would get a string? How would you respond to such a wrong request?
- Spit out an error telling why you refused the request
- If forum-page.php is called without the "forum" variable simply redirect to a default page, something like forum-page.php?forum=1. The same thing for a wrongly typed forum variable.
- Redirect to some other page. Something like the forum/board index?
- Other options?
Would really love to read your opinions about this.