RE: [PHP-WIN] Problem with submit

From: Date: Wed, 09 May 2001 18:42:30 +0000
Subject: RE: [PHP-WIN] Problem with submit
Groups: php.windows 
Request: Send a blank email to php-windows+get-7406@lists.php.net to get a copy of this message
Jerry, This is a very, very common problem. The other person has "error_reporting" in his php.ini set to E_ALL. Have him set his error_reporting to something a little more restrictive - like "error_reporting= E_ALL & ~(E_NOTICE | E_USER_NOTICE)". There really isn't anything wrong with the code - its just that for debugging, PHP has E_ALL that tells you things you probably don't need to know (like a variable that isn't defined). -----Original Message----- From: Jerry Nelson [mailto:jnelson@datanamics.com] Sent: Wednesday, May 09, 2001 2:20 PM To: php-windows@lists.php.net Subject: [PHP-WIN] Problem with submit 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 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net For additional commands, e-mail: php-windows-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#7406) next »