<!DOCTYPE html>
<html>
<head>
<title>Demo Post Method</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form method="POST">
Username: <input type="text" name="username" value=""/> <br/>
password: <input type="password" name="password" value=""/><br/>
<input type="submit" name="send" value="send"/><br/>
<?php
// Nếu người dùng click vào button Gửi Dữ Liệu
// Vì button đó tên là send nên đó cũng là
// tên của key nằm trong biến $_POST
if (isset($_POST['send'])){ echo 'Username: ' . $_POST['username'];
echo '<br/>';
echo 'Password: ' . $_POST['password'];
}
?>
</form>
</body>
</html>
PCFET0NUWVBFIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgICAgPHRpdGxlPkRlbW8gUG9zdCBNZXRob2Q8L3RpdGxlPgogICAgICAgPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLTgiPgogICAgPC9oZWFkPgogICAgPGJvZHk+CiAgICAgICAgPGZvcm0gbWV0aG9kPSJQT1NUIj4KICAgICAgICAgICAgVXNlcm5hbWU6IDxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSJ1c2VybmFtZSIgdmFsdWU9IiIvPiA8YnIvPgogICAgICAgICAgICBwYXNzd29yZDogPGlucHV0IHR5cGU9InBhc3N3b3JkIiBuYW1lPSJwYXNzd29yZCIgdmFsdWU9IiIvPjxici8+CiAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJzdWJtaXQiIG5hbWU9InNlbmQiIHZhbHVlPSJzZW5kIi8+PGJyLz4KICAgICAgICAgICAgPD9waHAKICAgICAgICAgICAgICAgIC8vIE7hur91IG5nxrDhu51pIGTDuW5nIGNsaWNrIHbDoG8gYnV0dG9uIEfhu61pIEThu68gTGnhu4d1CiAgICAgICAgICAgICAgICAvLyBWw6wgYnV0dG9uIMSRw7MgdMOqbiBsw6Agc2VuZCBuw6puIMSRw7MgY8WpbmcgbMOgCiAgICAgICAgICAgICAg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