Hi there, I need a little help with a php script I am working on. I am fairly new to PHP, so please excuse me if I don't understand a few things.
With regards to this script here:
http://pastebin.com/d546f3dff
I am receiving a blank white page and after adding debugging options, I am left with the following notices:
Notice: Undefined variable: sub in /home/mobsters/public_html/pages/oc.php on line 50
Notice: Undefined variable: submit in /home/mobsters/public_html/pages/oc.php on line 122
Clearly, I would like to eliminate these "problems" so that my script is free from errors.
How would I go about doing this?
Thanks
Annoying Errors
Moderator: General Moderators
- The_Anomaly
- Forum Contributor
- Posts: 196
- Joined: Fri Aug 08, 2008 4:56 pm
- Location: Tirana, Albania
Re: Annoying Errors
The great thing about, "Annoying Errors," Is that they tell you where your mistake is. On line 50, it says that $sub is undefined. So, you go to line 50, and see that $sub is defined in another conditional above it on line 42. Perhaps the conditions for this statement are not working, hence not defining your $sub and causing an error?
Re: Annoying Errors
$sub is being defined in an isset.
Moving on from the errors as I've fixed most of them.... WSoD!
Moving on from the errors as I've fixed most of them.... WSoD!
Re: Annoying Errors
Updated code is here -
Added output to exit()
and completed addition of isset
http://pastebin.com/d5e6bd567
Added output to exit()
and completed addition of isset
http://pastebin.com/d5e6bd567