Urgent: PHP undefined variable causing problems

by 7 replies
9
I need this fixed ASAP. PM me what you charge for it and where to send the money.

Here's the code:
It's returning undefined variable errors, and they're getting inserted in the POST data for the form on the page it's used in. Once per line that contains:

That's screwing up tracking, which I can allow to happen for very long at all.

Suggestions?


Paul
#programming #causing #php #problems #undefined #urgent #variable
  • Hi Paul

    I really didn't look at it too hard so I might just be missing something obvious, but what purpose does "single" have in the following line:

    Just wondering if it was a predefined constant (traditionally they are in uppercase), another variable (in which case it's missing the preceding $ sign) or a string (in which case it needs quotes around it).

    Again this might be totally irrelevant, but it just caught my eye.

    All the best...

    Bill
    • [1] reply
    • Bill,

      I have absolutely no idea. I didn't write the code. I'm, not a programmer...


      Paul
      • [1] reply
  • I think we need to see your index.php file, specifically the code block that includes line 49. (sometimes an error is on the previous "line" number)
  • You've not included the relevent code to do with your second error. Your options are:
    - find the page variable, and use the isset() function before performing any operations on it, or
    - use error_reporting(247) to switch off undefined variable errors (not recommended, but a quick fix)
    • [2] replies
    • That little tag at the end of the post is what appears on the lines where the error was noted.

      It's been fixed. Don (zerofill) whipped up a substitute bit of code that's much smaller, cleaner, and does the job.

      Thanks to all. Especially the person who gave me the error reporting suppression code, which cured the symptom and gave me more time to fix the problem.


      Paul
    • *posted in wrong thread*

Next Topics on Trending Feed