$_ GET gets the data requested by get
$_ POST gets the data requested by post
the following example
<html>
<body>
<?
$flag = $_GET["flag"];
if($flag=="1")
echo "".$_POST["user"]."";
else
echo "
<form action="?flag=1" method="post">
:<input type="text" name="user" size=15>
<input type="submit" value="submit">
</form>";
?>
</body>
</html>
the first time to open this page is a form
fill in the name, click submit, using the post method, why can $_ GET ["flag"] get the value of flag?
I don"t quite understand how it works.
is the data here transmitted in post or get mode? Or have you passed it both ways?