I have one page with a form that submits to a second page with its own form.
In the second page,
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
always returns true and the if condition executes - I'm not sure if its because its called from a first form itself - but normally that's what I do to check the form is submitted, and it works as expected. Ie, as soon as the page/form opens, it executes the code inside the condition, when obviously it should not.
I need to be able to check in the second form when it is submitted itself ?
Its just a standard short form with its own button
<input type='submit' value='GO!'>
It comes from a first form with its own button
<input type='submit' value='Delete'>