There are two pages to demonstrate the issue.
The page test-post1 content is the form itself and the method is specified as POST:
Code: Select all
<form action="test-post2" method="post" name="my_test" id="my_test">
<input id="t1" name="t1" type="text" />
<input value="ok" name="t2" id="t2" type="submit" />
</form>
Code: Select all
<p>thanks</p>
{php}
echo $_SERVER['REQUEST_METHOD'] . "<br/>";
print_r($_POST);
print_r($_GET);
echo "<br/>t1=" . $_POST["t1"] . " (via post)";
echo "<br/>t1=" . $_GET["t1"] . " (via get)";
{/php}
Code: Select all
thanks
GET
Array ( ) Array ( [page] => test-post2/ )
t1= (via post)
t1= (via get)
What makes the change of the http request method? Is it the engine of CMSMS?
Thank you.