How to solve undefined index notices

Hi,
I am trying to fix a lot of undefined index notices in my classified ads php website. I've read lots of post here, and I thought that it is easy to remove those notices, just using isset(). In effects, notices disappears, but some times the script stops from working as it should. Can someone explain, in general and in poor words, how to manage this notice? E.g., "use isset if you deal with a $_ variable, or use empty if you deal with a $var variable" and so on? (if it is possible to write a rule like that, I don't even know!)
jimgordonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gamebitsCommented:
You can always put at the topof your page

error_reporting(0);

this will hide all the notices warnings and errors, in case of a major error (an error that will break the script) you will end up with a blank page.

Not exactly a good programing tactic but rather a quick fix.
0
jimgordonAuthor Commented:
Yes, I know. My intent is to fix those notices, not to hide them.
0
gamebitsCommented:
Then you need to use the isset() function or to assign a default value at the top of the script, value to be use by the script if the variable is not overwritten by a $_POST['var'] value.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

jimgordonAuthor Commented:
Why if variable is not a $_ ? E.g.: let's pretend variable is 'x'.
Can I still use isset?
The problem is that I'm looking for a general rule, since I have spent all day in adding isset() in front of those variable that caused notices, and  at the end I've found that lots of thing don't work anymore properly.
0
gamebitsCommented:
if(isset($_POST['var']))

if(isset($var))

both should work, the question is what is the script is suppose to do if the variable is not set
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jimgordonAuthor Commented:
the problem is that aI have a lot of these notices all around the website. I cannot post here notice by notice. Is there a way to hire someone of you here and pay for a finished job?
0
gamebitsCommented:
I don't think it's in accordance with EE rules to post a paid job offer, but I know as a programmer we can can post our email address in our profile and I know some offer to tackle projects.

What is the website all about? How many pages? Is it a script that you bought and try to modify? May be they offer some kind of support if it's the case.
0
jimgordonAuthor Commented:
Yes, I purchased this script from a developer, but i don't think he would solve these notices for me only. It is a classified ads script you can see at www.annunci.cc. It is about 90 pages (less than 1Mb). Page affected are less than 90, anyway.
0
gamebitsCommented:
Beside EE there is quite a few website where you can post a project and have programers bid on it

www.rentacoder.com
www.php-freelancers.com
www.getafreelancer.com
www.scriptlance.com

are a few of them
0
gamebitsCommented:
The script is Italian so I guess the comment in the script are also written in Italian, having a programer who is fluent in the language might help a lot fixing those issue for you.
0
jimgordonAuthor Commented:
No, the script is entirely in english. I only changed the language file. I can send you the english file if you need.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.