Write a PHP script to implement form handling using post method.

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["name"])) {
    $name = htmlspecialchars($_POST["name"]);
    echo "Hello, $name!";
}
?>

<!DOCTYPE html>
<html>
<body>
    <form method="post">
        Name: <input type="text" name="name">
        <input type="submit" value="Submit">
    </form>
</body>
</html>