Use of undefined constant????

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Krucifyx
    Senior Member
    • Jun 2000
    • 115

    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";
    }
  • Dennis Wrenn
    Member
    • Sep 2000
    • 93

    #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

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...