Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable undefined error. 1

Status
Not open for further replies.

dabsoft

Programmer
May 12, 2001
5
US
I use an if statement to check if a variable has been defined, but the stinkin' thing blurts out an error on my page. My if looks like this:

if (!$submit)

And on my page it blurts out this:

Warning: Undefined variable submit in on line 32.

What do I do to keep it from buging up my page like that?
 
Forget it, I just went into php.ini and set the error reporting to E_ERROR for fatal errors only instead of E_ALL.
 
You may consider another approach to this problem as well: the isset() and empty() functions. Since evaluating a boolean value by a variables own accord is not supported in PHP, it may yield unpredictable results in future releases.

brendanc@icehouse.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top