Problem with submit

From: Date: Wed, 09 May 2001 19:20:25 +0000
Subject: Problem with submit
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-7403@lists.php.net to get a copy of this message
We have two developers that are just learning PHP. Working with the following code I do not have any problems. However, the other person gets the error : Warning: Undefined variable: submit in ..... The code is : <?php if ($submit){ //process form
        $sql="insert into ascodes values('$ascode','$name', '$date', '$desc','$date')";
        $result = $db->query($sql);
        echo "Thank You, come again\n";
}else{ ?> <form method="POST" action="<?php echo $PHP_SELF ?>" >
        Accounting Code: <input type="text" name="ascode"><br>
        Your name: <input type="text" name="name"><br>
        Todays Date: <input type="text" name="date"><br>
        Description: <input type="text" name="desc"><br>
        <input type=submit name="submit" value="insert record">
        </form>
<?php } ?> *---------*-----------*----------*---------*---------*---------*--------* Jerry Nelson Datanamics, Inc. 973-C Russell Ave Gaithersburg, MD 20879

« previous php.windows (#7403) next »