if(isset($_POST['submitted'])). Recently I have come across this method
if($_SERVER['REQUEST_METHOD'] == 'POST')
Do they both do the same thing? Is one method better than the other to use and why?
Posted 10 January 2012 - 09:59 AM
if(isset($_POST['submitted'])). Recently I have come across this method
if($_SERVER['REQUEST_METHOD'] == 'POST')
Posted 10 January 2012 - 12:12 PM
gadgetgirl, on 10 January 2012 - 09:59 AM, said:
if(isset($_POST['submitted'])). Recently I have come across this method
if($_SERVER['REQUEST_METHOD'] == 'POST')
Posted 10 January 2012 - 04:36 PM
gadgetgirl, on 10 January 2012 - 09:59 AM, said:
if(isset($_POST['submitted'])). Recently I have come across this method
if($_SERVER['REQUEST_METHOD'] == 'POST')
if(isset($_POST['submitted']))this is specifically checking if the submit button is pressed, and if it is then you run your processing code or you can do both i guess. checking the request method and also checking if the submit button is clicked