PHP instance code: determines whether the Form is submitted. LieHuo. Net (LieHuo. Net) PHP programming today introduces an article about PHP determining whether to submit the Form. a friend asked this question at the webmaster Q & A forum a few days ago.
Fire station building Institute (
Bkjia. Com
) PHP programmingToday, I will introduce an article about PHP determining whether to submit the Form. a friend asked this question in the webmaster Q & A forum a few days ago, and then someone gave the instance code. the code is as follows:
Reference content is as follows: $ Action = $ HTTP_POST_VARS ["Button1"]; If ($ action = "submit "){ // Execute the form operation } Else { // Read the default value } ?> |
In fact, the above code is somewhat complicated and can be simplified:
Reference content is as follows: If (isset ($ HTTP_POST_VARS ["Button1"]) { // Execute the form operation } Else { // Read the default value } ?> |
Pipeline (LieHuo. Net) PHP programming today to introduce an article about PHP to determine whether to submit the Form, the previous day in the webmaster Q & A Forum saw a friend asked this question, then...