When processing a form, you need to know when the form has been submitted and then you can do the processes that are required. Here is the ColdFusion and PHP equivalent to each other for recognizing when a form has been submitted.
As I go from using ColdFusion to learning PHP, I have to note the differences between the ColdFusion language and the PHP language.
PHP equivalent:
-
if(isset($_POST['btnSubmit']))
-
{
-
“do something”
-
}
ColdFusion equvalent:
-
<cfif ISDEFINED(‘FORM.btnSubmit’)>
-
“do something”
-
</cfif>