The HTML File

"simpleform.html"
<html>
<head>
    <title>Test Program: Send Form to PHP script</title>
</head>

<Body>

<form method='post' action='simpleformproc.php'>
        Enter your name:<br>
        <input type='text' name='yourname'>
        <P>
        <input type='submit'>
</form>

</Body>
</html>

The PHP Script to Process the Form above

"simpleformproc.php"

<html>
<head>
     <title>The processor of simpleform.html</title>
</head>

<body>

<center>
Hello &nbsp;

<?php
// get name from form
$name = $_POST['yourname'];

// did they really enter something?
if (strlen($name) == 0)
    echo "whoever you are.";
else
    echo $name;
?>

</body>
</html>