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:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 2:20 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]