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

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

<head>
    <title> playing with here documents </title>
</head>

<body>
    <h2> playing with here documents </h2>    

    <h3>
    <?php
        if (array_key_exists('customer_name',$_POST)) 
        {
            $name = $_POST["customer_name"];
            print <<<HTMLSTUFF
            $name's items
                <ul> 
                    <li> $name's books
                    <li> $name's magazines
                    <li> $name's bicycles
                </ul>
HTMLSTUFF;
        } 
        else 
        {
            print <<<HTMLFORM
            <form method="post" action="$_SERVER[PHP_SELF]">
                    Your name: <input type="text" name="customer_name">
                    <br>
                    <input type="submit" value="Say Hello">
                    <input type="reset">
                </form>
HTMLFORM;
        }
    ?>

    </h3>

</body>
</html>