PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hello,
I've just searched the forum and googled to find a solution for those errors:
Notice: Undefined index: go_back in c:\wwwroot\frigerio\anagrafica_ins0.php on line 119
Notice: Undefined variable: ragsociale1 in c:\wwwroot\frigerio\anagrafica_ins0.php on line 155
....
I've got all of them for the following piece of code
I've tried also to put a @ before $variable_name but it doesn't solve the problem.. I know this happens since first time I visit the page I don't have variables stored into session's variables space, but the first time it's right, any suggestion to fix it? I can't change error level reporting.
Thanks
If he would not use session_start() he would not get a notice but a fatal error.
A notice only shoes up on error reporting all in php.ini. If you use a variable without initializing it first you get the notice. If you session variable does not exist it does not count as initialization. You could use a $var = ""; for every var first to avoid the notice. Sometimes it can be a pain to honor all notices.
But, it's a good idea. Undefined variables/indexes are always some of the biggest problems when it comes to this, but they make poisoning scripts with register globals far easier.