--- Arne Rusek <[EMAIL PROTECTED]> wrote: > I used this form: > > <form action="test.php" method="POST"> > Your name: <input type="text" name="username"/><br/> > Email: <input type="text" name="email"/></br> > <input type="submit" name="submit" value="Submit me!"> > </form> > > The test.php script contained this code: > > <?php > error_reporting(E_ALL); > echo "<pre>\n"; > phpinfo(); > echo "</pre>\n<br/>"; > var_dump($_POST); > ?> > > Then I saw a pretty large page but at the end there was > > array(0) { } > > and _that_ seemed to me pretty strange.
That does seem strange. I glanced at this page of yours: > http://zonk.matfyz.cz/php_post_problem And I saw this: REQUEST_METHOD => GET So, why was the request a GET request rather than a POST request? There is no content nor any entity headers either, so it doesn't seem like this line (telling us that the request method was GET) is wrong. However, I also don't see any URL variables, so it doesn't seem like the HTTP request contained any form data, whether GET or POST. > http://zonk.matfyz.cz/php_get_problem This looks a bit better. We still have a GET request method, and the query string has something: QUERY_STRING => username=zonk&email=zonk&submit=Submit+me%21 However, I can't explain why a print_r($_GET) would not display the username, email, and submit form variables. Maybe you can try: echo $username; echo $_GET['username']; echo $_POST['username']; echo $_REQUEST['username']; echo $_SERVER['QUERY_STRING']; Hopefully one of this will output something relevant. Otherwise, I suppose it's possible that there is a bug in the CGI SAPI, unless I'm missing something. Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php