locked
Not getting any $_POST array RRS feed

  • Question

  • I am not getting any $_POST array from a form submission.  The form is

    <div id="left_col"><br>
     <form action ="index1.php" method="post">
       <label>User ID:</label><input name="userid" size="16" type="text" ><br>
       <label>Password:</label><input name="password" size="16" type="password"><br><br>
       <input name="submit" type="submit" value="Submit">
       </form>
    </div>

    The separate file index1.php is

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>

    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <title>index1</title>
    </head>

    <body>
    xxxxxxxxxxxx<br>
    <?php
    print_r ($_POST);
    ?>
    </body>

    </html>

    The page displayed after the submit button from the form is hit is

    xxxxxxxxxxxx
    Array ( )

    I have tried doing a print_r of $_SERVER, and this produces the right output.  I have tried using GET method instead of POST, and I get the same result (empty $_GET), despite seeing the GET parameters with the URL.

    I am using Web Expression 4, the WE4 development server, and PHP with the development settings in php.ini.

     

    Monday, November 14, 2011 12:21 AM

All replies

  • This is not an EW question. You might want to try a PHP forum. BTW, don't feel put upon; we direct those with asp.net questions of this nature to http://forums.asp.net, as well. EW is primarily a design tool, not a server-side development environment.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    Monday, November 14, 2011 1:06 AM
  • I am using Web Expression 4, the WE4 development server, and PHP with the development settings in php.ini.
    Maybe you should try XAMPP development server.

    • Edited by romh0 Monday, November 14, 2011 2:45 AM
    Monday, November 14, 2011 2:44 AM