Jump to content


New Members
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About ProblemHelpPlease2

  • Rank
  1. ProblemHelpPlease2

    Undefined index repeating error

    Well at least I know I had the code correct as its exactly what you have provided. To answer your question the problem went away on the next run through, I had 5 errors all the same, changed 1 of them to see if it made a difference and then had 4 errors as you would expect. It was 5 minutes later that the issue reappeared. I checked the code and it still had my change in it. I wondered if it might be a cache issue but that's harder to check as the site is currently on a server that I don't have full access to. I guess the next step is to make the code change again (I reverted it) and then leave it for 24 hours and see if its still giving me the error in the logs. Thank you for your help.
  2. ProblemHelpPlease2

    Undefined index repeating error

    I have a simple problem but seem to be hitting a roadblock with fixing it. I am in the process of upgrading a site from PHP 5.6 to 7.0 (eventually to 7.2) I am seeing error notices like PHP Notice: Undefined index: productpage in ….. I know this it because the $_REQUEST can sometimes be empty depending on what data is passed back and when certain pages are loaded $productpage = mysqli_real_escape_string($con, $_REQUEST['productpage']); I also know that I could turn the error notice off or use isset to check $_REQUEST but I would prefer to use the ?? '' option to fix this issue. The problem is that when I add the ?? '' option to the above code the problem resolved itself but then moments later the same error on the same line reappeared in the error logs and I cant understand why. Can someone give me the correct example of where to place ?? '' in the above code so that I can rule out my potentially dodgy code as being the reason the error keeps reappearing.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.