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.

POST method not working

Discussion in 'General Discussion' started by clauderodney, Jun 18, 2008.

  1. clauderodney

    clauderodney Member

    Joined:
    Jan 17, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have come across dead end with respect to this problem that i am facing. I have a simple test code which i am trying to get it work. I have used the $_post method in order to pass input from one page and to be displayed on on another page. However I don't get any output or specific error message, all I get is Array().

    There are two file the first file contains the below code:

    ---------------------------------------------------------------------
    <form method="post" action="dst01.php">

    <br>

    Enter your name: <input type="text" name="first_name0"/> <br/>

    <input type="submit" name="submit"/> </form>


    ------------------------------------------------------------------

    In this code i am taking the input from the user.
    Below is the dst01.php file which contains the following code:

    --------------------------------------------------------------------
    <?php

    echo "Your name is :".$_POST["first_name0"]."<br/>";

    ?>

    <?php print_r($_POST); ?>
    -------------------------------------------------------------------------

    I have enabled the register_globals in the php.ini file still it gives the same message Array()

    I'm not able to understand what is it that needs to be enabled.... ultimately it seems that the $_POST is not working.

    I need urgent help on this.... if any one has any suggestion on resolving this problem feel free to post in.....
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Enabling register_globals would not assist in making this work. I recommend disabling register_globals.

    $_POST should work in PHP without anything needing to be enabled. Do you have root access to the server?
     
  3. clauderodney

    clauderodney Member

    Joined:
    Jan 17, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have disabled register_globals. Yes i do have root access to the server.
     
  4. clauderodney

    clauderodney Member

    Joined:
    Jan 17, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Resolved

    Hi

    Thank you all for helping me in the never ending task.

    Anyway i found the solution. I don’t know how but the solution was a silly one. I found a post in the forum of cpanel.net and a similar problem was resolved by commenting the line

    LoadModule bandwidth_module libexec/mod_bandwidth.so in the httpd.conf and restarting apache.

    I tried the same without many expectations and the problem resolved.
     
Loading...

Share This Page