Announcement

Announcement Module
Collapse
No announcement yet.

Use of undefined constant????

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use of undefined constant????

    This has been really pissing me off. I'm using error_reporting(15), and whenever I try to call on an array, I get this error:

    Warning: Use of undefined constant field - assumed 'field' in filename on line x

    WTF!!!!!!! Why the hell am I receiving this error!!!!:

    The code:

    if (isset($HTTP_COOKIE_VARS[cookie])) {
    print "test";
    } elseif (isset($login)) {
    print "test2";
    } else {
    print "test3";
    }

  • #2
    if cookie is a variable you need $ in front of it, and if its supposed to be a string, enclose it in quotes.
    Visual Basic, HTML, PHP, SQL, ASP, JavaScript, C++, Perl

    PHP 4.0.6
    MySQL 3.23.39
    Windows 2000

    Comment

    Working...
    X