: This article mainly introduces N examples of web development-Case 3: passing parameters between php and html using the post and get methods. For more information about PHP tutorials, see. Web development N examples
Case 3: use the post and get methods to pass parameters between php and html
Case3.php:
Case 3
Click the hyperlink to pass parameters
Case3-output.php:
"; Else echo" failed to pass data through get
"; If (isset ($ _ GET [" getHidText "]) echo" the hidden data transmitted by get is: {$ _ GET ['gethidtext']}
"; Else echo" no hidden data passed through get
"; If (isset ($ _ GET [" urlText "]) echo" the data transmitted by the url is: {$ _ GET ['urltext']}
"; Else echo" data is not transmitted through url
"; If (isset ($ _ POST [" postText "]) echo" the data transmitted by post is: {$ _ POST ['posttext']}
"; Else echo" data is not transmitted through post
"; If (isset ($ _ POST [" postHidText "]) echo" the hidden data passed by post is: {$ _ POST ['posthidtext']}
"; Else echo" no hidden data passed through post
";
The annotations are very detailed and do not need to be clarified.
N examples of web development-Case 3: passing parameters between php and html using the post and get methods, including the following content, if you are interested in PHP tutorials.