php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14
Submitted: 1998-01-27 05:26 UTC Modified: 1998-01-27 10:58 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: wombat at hof dot baynet dot de Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0b3 OS:
Private report: No CVE-ID: None
 [1998-01-27 05:26 UTC] wombat at hof dot baynet dot de
PHP does not handle POST data correctly. If I write a HTML Form that
sends some information to the .phtml script, it *does* set the variables
(<input ... name="var" value="val"> DOES result in $var = "val", but $argv
and $argc are not set correctly ($argv[0], $argv[1] etc do not return anything)

html:
<form method=POST action="test.phtml" enctype="application/x-www-form-urlencoded">
<input type="text" name="variable" value="value">
<input type="submit" value="Submit">
</form>

phtml:
<?; echo $argc; echo $argv; echo $argv[0]; echo $argv[1]; ?>

Possible solution: can I read data directly from STDIN ?

There are no extras compiled in php, except the Apache Support (running Apache 1.3)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-01-27 10:58 UTC] rasmus
Not a bug.  $argc and $argv are not supposed to be set for POST data.
They are only set for GET data.
 [2012-06-05 12:11 UTC] ohill@php.net
Automatic comment from SVN on behalf of ohill
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=325986
Log: Update test #14 to cope with recent lib changes
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC