Switched php versions now some things dont work...Please help

Discussion in 'PHP' started by sundaybrew, Sep 26, 2006.

  1. #1
    I recently just moved my site to a new server and it seems this server is running a newer version of php.

    I am using urls like index.php?goto=pagename

    With the following code in the index, but when you go to any url with that extension, it just shows the home page doent open the page inside the php frame, Can some one please help me fix this

    //Run the page of selection
    if ($goto != "")
    {
        //Pull in the html page...
        $goto = strtolower($goto);
        $goto = str_replace('/','',$goto);
        $goto = str_replace("\\",'',$goto);
        $goto = str_replace('php','',$goto);
        $goto = str_replace('html','',$goto);
    PHP:
     
    sundaybrew, Sep 26, 2006 IP
  2. Chaos King

    Chaos King Peon

    Messages:
    88
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is because in the more updated versions of PHP, register_globals have been turned off to reduce security issues. Add this at the top of your file.

    $goto = $_GET['goto'];
    PHP:
     
    Chaos King, Sep 26, 2006 IP
    sundaybrew likes this.
  3. sundaybrew

    sundaybrew Numerati

    Messages:
    7,294
    Likes Received:
    1,260
    Best Answers:
    0
    Trophy Points:
    560
    #3
    AWESOME MAN~!

    That was it!

    Some GREEN for you!

    Thank you soooo much!
     
    sundaybrew, Sep 26, 2006 IP