Results 1 to 7 of 7

Thread: variables are screwed (urgent)

  1. #1

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609

    Lightbulb variables are screwed (urgent)

    I have a command line for my page like this: http://127.0.0.1/variables.php?something=elooo

    but the code doesnt recognise the $something variable. it gives this error:
    Notice: Undefined variable: something in c:\windows\desktop\files\wwwroot\variables.php on line 9
    is this a stuffed up setting ? or something I'm doing wrong ?

    this is the code in the page :
    PHP Code:
    <html>
    <body>
    <b>Variables</b>

    <?PHP
    //IF (isset($something))
        
    ECHO $something;
    ?>
    </body>
    </html>

  2. #2
    Lively Member
    Join Date
    Apr 2001
    Location
    The Netherlands
    Posts
    94
    What is the exact code at line 9 ?

    Is this it ? "ECHO $something;"

    Otherwise just try this on thepage.

    PHP Code:

    <html>
    <body>
    <b>Variables</b>

    <?PHP
    $something
    "1234567";

        ECHO 
    $something;
    ?>
    </body>
    </html>
    Test that and see if it echoes it....
    "Against All Odds"

  3. #3
    scoutt
    Guest
    what version of php are you on? and is registar_globals turned off?

  4. #4
    scoutt
    Guest
    you can turn the warning off. just uncomment this or add this to the php.ini file.

    ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
    ;
    ; - Show all errors except for notices
    ;
    error_reporting = E_ALL & ~E_NOTICE

  5. #5

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    it was that "registar_globals" was turned off, thanx scoutt

  6. #6
    scoutt
    Guest
    it is recommended to leave it off for security reasons. alll version after 4.2 will have it off.

  7. #7

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    lol, yeh, cos i had a previous version installed before this one that could explain the problems .

    thanx again dude

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width