Patrick Fleming, EA wrote: > > > todd hewett wrote: > >> On Wednesday, February 23, 2005 11:29 PM Craig White wrote: >> >>> undeclared variable is exactly that - you are referring to it as if it >>> had a value assigned and it obviously doesn't. >> >> >> >>> very helpful tip - dump your variables to see their values. >> >> >> >>> var_dump($variable1,$variable2);exit; >> >> >> >>> Craig >> >> >> >> Ahhhhhhhh That sounds great. >> >> To (further) reveal ignorance. >> >> Where (semi exactly) would I use that sytax? >> >> In a webpage, from CLI...... >> >> Feeling pretty meek. > > > Insert this after all your variables are supposed to be declared in > your web page. > > Also newer versions of PHP complain about unintialized variables, > older versions just kind of ignored that a variable wasn't set. If you > have variables that might or might not have a value when the script is > looking at them set them to blank at the top of the script eg. > $var1 = ""; //Only used sometimes. > $var2 = "Normal contents"; //Regular setting > > Current PHP also changed the way certain variables are read so if you > are using an older script you may have to look for variables related > to file uploads and change them to use the newer syntax. All data > related to file uploads is in the superglobal $_FILES > > Patrick > --------------------------------------------------- What versions complain about undeclared variables? I haven't used 5 yet so I assume it's 5? You can also adjust the notice reporting in the php.ini file to only report errors. error_reporting = E_ALL & ~E_NOTICE means report all errors except notices. --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss