Question about post and get with forms

The example provided in “Build your own database driven website using php & mysql” they use the following form setup in jokes.html.php:
<form action=“?deletejoke” method=“post”>

why would they then suggest to use:
if (isset($_GET[‘deletejoke’]))

to “get” the varialbe? wouldn’t you use post since the form is method= “post”?

thanks

But ‘deletejoke’ isn’t passed as a form field, but in the query string. And parameters passed in the query string are available through $_GET.

It’s the fault of php creators.
The real source of the GET array is query string, and it’s name has no relation to the method used.

Cool, so basically this was just a shortcut the author took, rather than building in an invisible “deletejoke” field in the form to pass the variable via POST?

Right.
Query string is often used to control your app, no matter which method is used.