View Full Version : Undefined variable error
04-01-2003, 10:58 AM
I'm running Apache on the Windows 2000 box, and often getting this error lately. Does anyone had the same problem as I do? By the way, the PHP script works fine. I'm also test some of PHP script on the Windows XP box, it does not giving me "Underfined Variable" error. Anyone has any solution or suggestion, please share. Thanks
04-01-2003, 04:22 PM
Apparently you have different error reporting levels set in your PHP setups. Look into each php.ini, there should be a section named "error reporting" or something similar and change that to suit your needs. Of course, this means changing to E_ALL, because good scripts should run without any notices appearing. ;
You're "real" error is that you use a variable but forgot to check if it does exist at all. The isset() function helps you overcome this problem, you can use it to check the existence of a variable and if necessary, assign a default value.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.