Perhaps I am doing something wrong from the very beginning, and if so, I will also work on it ...
I have a menu item that, as part of the URL, passes event identifier #. In my particular case, the user goes to the information page for this event. Then there is a button that allows them to register for the event. Click, and they subscribed to the Event and returned to the same information page, which now says that they are registered and allow them to see a few additional things.
The first time they click on the page, I use $ _GET to determine the event identifier #, which is then passed back to the page if they click the registration button as a hidden input field. But this time I need to use $ _POST to determine the event ID. So the code in my request has a logical part that looks like
SELECT stuff FROM ... WHERE eventID = ($_GET["ID"] ? $_GET["ID"] : $_POST["ID"])
It works, but it just feels that it can be done better ...
source
share