|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-05-15 15:50 UTC] mikepeterson at videotron dot ca
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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
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>";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.