<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
</head>
<body>
<?php
// apply basic sanitation
$username = htmlentities($_POST['username']);
$pw = htmlentities($_POST['password']);
// if the button is triggered
if(isset($_POST['submit'])) {
// query here
}
?>
<form action="" method="post">
<label>Username</label>
<input type="text" name="username" required> <br>
<label>Password</label>
<input type="password" name="password" required> <br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>