ID: 10887 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Bogus Bug Type: Unknown/Other Function Operating system: PHP Version: 4.0.5 Assigned To: Comments: Not bug. Check your setting in php.ini Previous Comments: --------------------------------------------------------------------------- [2001-05-15 16:27:19] [EMAIL PROTECTED] This function did not work in PHP4.05: elseif ($delete) { // delete a record $sql = "DELETE FROM models WHERE model_id=$model_id"; $result = mysql_query($sql); echo "$sql Record deleted!<p>"; } Unless I added isset() like so: elseif (isset($delete)) {} But as I added that in other functions that returned a value from mySQL, every value returned would be "1" or TRUE. --------------------------------------------------------------------------- [2001-05-15 16:23:28] [EMAIL PROTECTED] This script shows no isset(), please be a little more descriptive. Derick --------------------------------------------------------------------------- [2001-05-15 16:01:31] [EMAIL PROTECTED] Here is an example of a script that returned the error in 4.05, and works in 4.04. elseif ($delete) { // delete a record $sql = "DELETE FROM models WHERE model_id=$model_id"; $result = mysql_query($sql); echo "$sql Record deleted!<p>"; --------------------------------------------------------------------------- [2001-05-15 15:54:10] [EMAIL PROTECTED] Please post a short reproducing script. (short is under 10 lines) --------------------------------------------------------------------------- [2001-05-15 15:50:01] [EMAIL PROTECTED] When using PHP4.05 my script always told me a variable from a form I had on the page was undefined. Using isset() the script ran without problems, but returned every query with "1" (my best guess is that is TRUE from isset()). I installed PHO4.04 and everything ran perfectly. Mike Peterson --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10887&edit=2 -- PHP Development 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]