this is my page when i run it i got the excption  which sayes that the formSubmit is not define . i know that i have to check if the post contents that variable but i couldn't know the solution 
 <?php
    if($_POST['formSubmit'] == "Submit")
    {
        $errorMessage = "";
        if(empty($_POST['formPassword']))
        {
            $errorMessage .= "<li> You forgot to enter your password!</li>";
        }
        if(empty($_POST['formName']))
        {
            $errorMessage .= "<li> You forgot to enter a name!</li>";
        }
        $varPassword = $_POST['formPassword'];
        $varName = $_POST['formName'];
        if(empty($errorMessage)) 
        {
            require('Document1.php');
            User::add_user($varName, $varPassword);
            exit;
            //header("Location: normal.php");
        }
    }
    ?>
    <html>
       <head>
        <title>SIGN UP</title>
        <style type="text/css">
    <!--
    .style1 {
        font-size: xx-large;
        color: #0000CC;
    }
    -->
        </style>
    </head> 
     <body>
     <p align="center"><br>
       <span class="style1">SIGN UP</span></p>
     <p> </p>
     <form action="myform1.php" method="post">
            <p>
                What is Your NAME ?<br>
            <input type="text" name="formName" maxlength="50" value="" />               
            </p>
            <p>
                What is Your PASSWORD ?<br>
                <input type="text" name="formPassword" maxlength="50" value="" />
            </p>
            <?php
            /*
            ?>
            <p>
                What is Your Email ?<br>
                <input type="text" name="formEmail" maxlength="50" value="" />
            </p>
            */
                ?>          
            <input type="submit" name="formSubmit" value="Submit" />
            <input type=reset value = "delete fields ">
     </form>
     </body>
    </html>
 
     
     
     
     
    