Please send questions to st10@humboldt.edu .
<html>

<!-- calling_self.php
     
     adapted from "Learning PHP 5", Sklar, O'Reilly, Chapter 9
     adapted by: Sharon Tuttle
     last modified: 11-07-06
-->

<head>
    <title> values from a form </title>
</head>

<body>
    <h2> values from a form </h2>    

    <h3>
    <table>
    <?php
        if (array_key_exists('my_name',$_POST)) 
        {
            print "Hello, ". $_POST['my_name'];
        } 
        else 
        {
    ?>
            <form method="post" action="<?php 
                                    print "$_SERVER[PHP_SELF]" ?>">
                Your name: <input type="text" name="my_name">
                <br>
                <input type="submit" value="Say Hello">
            </form>
    <?php
        }
    ?>

</body>
</head>