well, Ill share my tips to successfully debugging a program:
If it’s an undefined index error, you obviously didn’t define an index 😃 But really, those come from $POST/$GET[‘blah’]; that isn’t there, put the option in the form, or remove it, it also happens if you misspell the [‘balh’];
If it’s an unexpended end then you have an unclosed if/other statement, try adding a “}” in the proper place and that should fix it right up.
If it’s an undefined variable, then you didn’t define a variable, or you misspelled the variable in the place you need to do something with it, check to make sure you defined it and spelled it correctly.
If it is an error with Permission denied in it, chmod the file to 777, or 775, or something else that allows it to do what it needs to do.
If it is an error that says “No such file or directory” or something around those lines, the file doesn’t exist, or you misspelled it. (I have misspelled a filename in the script so many times it isn’t even funny, and the thing is, you don’t realize it until after 3 hours of pulling your hair out).
If the error is unexpected variable or something like that, then you forgot to add a “;” to the end of the last line, or you didn’t close a () properly like this: if(isset(blah){ it should be if(isset(blah)){ or you forgot the “{“ on the end. Its happened to me a lot, its kind of annoying because it’s the kind of thing that you don’t notice right away.
if it is an invalid argument supplied error, go to php.net and do a search for the function that you are using to look at the correct syntax. (it helps alot)
Im sure there are others, and if you know of a tip that I didnt post, go ahead and post it!