The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Form POSTs with PHP not working

Discussion in 'General Discussion' started by netarus, Dec 14, 2003.

  1. netarus

    netarus Well-Known Member

    Joined:
    Oct 27, 2002
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Anyone know why I can access php variables passed via a POST in a form on some servers, however, not all servers? I am accessing the variables by doing simple queries such as:

    PHP:
    if(!empty($variable_name)){
      
    //Do something
    }
    Just to answer the only solution I've thought of: I've never had to access the $_GET[] array to initialize a variable on some servers. Is there something wrong with the way these other Apache servers are setup?
     
  2. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    I bet that in your php.ini file on the servers that you can't initialize those variables, you have:

    register_globals = off or 0
     
  3. netarus

    netarus Well-Known Member

    Joined:
    Oct 27, 2002
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    That's the crazy part, register_globals = on. I've tried it both 'off' and 'on' and restarted httpd each time.
     
  4. hot_wired13

    hot_wired13 Active Member

    Joined:
    Oct 17, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    127.0.0.1
    try using 1 instead of on then, lol
     
Loading...

Share This Page