My php.ini file is set as: error_reporting = E_ALL
without E_NOTICE... Could be a harm if I use just E_ERRORS ? Afan ----- Original Message ----- From: Shrock, Court To: Shrock, Court ; Afan Pasalic ; [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 7:53 PM Subject: RE: [PHP-WIN] register_globals and php 4.2 Oops.....replace the "ALL" with "E_ALL" and "NOTICE" with "E_NOTICE" > -----Original Message----- > From: Shrock, Court [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 09, 2002 4:51 PM > To: Afan Pasalic; [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] register_globals and php 4.2 > > > You will get that error because you did not reach the page via the url > "index.php?var_name=tada", therefore, "var_name" is not > defined in the _GET > superglobal array so you get a warning because of your error_reporting > setting. The warning that was printed is actually a notice configured > within your php.ini-- error_reporting = ALL & ~NOTICE -- is > what it should > be. > > > -----Original Message----- > > From: Afan Pasalic [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, May 09, 2002 4:27 PM > > To: [EMAIL PROTECTED] > > Subject: Fw: [PHP-WIN] register_globals and php 4.2 > > > > > > I have the same problem but putting $var_name = > > $_GET['var_name'] didn't solve the problem. I put it on the > > top of the page (e.g. line no. 2) and I'm getting error: > > PHP Warning: Undefined index: var_name in > > F:\bhdanas.com\index.php on line 2 > > > > Any idea? > > > > > > Afan > > > > > > ----- Original Message ----- > > From: Shrock, Court > > To: brother ; '[EMAIL PROTECTED]' > > Sent: Thursday, May 09, 2002 1:07 PM > > Subject: RE: [PHP-WIN] register_globals and php 4.2 > > > > > > Replace all references of "$pagetype" with > > "$_GET['pagetype']" (without the > > doube-quotes, of course) or have the line "$pagetype = > > $_GET['pagetype']" at > > the beginning of your file. Repeat this same idea with your > > other variables > > and you should be okay. > > > > > -----Original Message----- > > > From: brother [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, May 09, 2002 5:11 AM > > > To: '[EMAIL PROTECTED]' > > > Subject: [PHP-WIN] register_globals and php 4.2 > > > > > > > > > I'm trying to rewrite my code so it will be useful under PHP 4.2. > > > the links at my site are in this format > > > index.php?pagetype=newsarchive&id=15&read=1 this will make > > > php to look fpr > > > the file /newsarchive/data.php and use the $id var to get > > the correct > > > newsline from the databse, however, when the register_globals > > > is set to off > > > I can't use this and I cann't figre out how to do it, HELP! > > > > > > the index.php starts with the code: > > > if (!isset($pagetype)) { > > > $pagetype = "news"; > > > } > > > > > > so all links displays the news page and that's not my goal =) > > > > > > /brother > > > > > > -- > > > PHP Windows Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >