This is a discussion on Apache/PHP using POST doesn't seem to pass parameters? within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm using: Apache 1.3.27 PHP 4.3.1 Redhat Linux 8 with all patches etc from up2date. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm using:
Apache 1.3.27 PHP 4.3.1 Redhat Linux 8 with all patches etc from up2date. Any scripts I try which use a POST to send data gathered from an HTML page to a PHP script don't appear to pass the information on. I have attached a couple of examples of the code I am trying to use: 1. access2.php is accessed and reads the contents of a file allowing me to edit the contents within a textarea. When I click submit the parameter 'filecontents' should be passed to the next page writeaccess2.php via a POST. writeaccess2.php should then write the contents of variable $filecontents back to the file. I just end up with a blank file after clicking submit which would indicate no parameter passed. 2. feedback.html is a feedback form which should mail me the details filled out on the form. This time the text area is named 'comments' which is sent to feedback.php also using a POST. I do receive an email but it's blank with no name, Email or comments which would also imply once again that the POST is not passing parameters. Is there something I need to do within the Apache httpd.conf or php.ini to allow the use of POST to pass parameters? Thanks in advance I've been racking my brains on this one. -- Simon Ashford MCP IT Consultant, Netlink Data Solutions Limited. |
|
|||
|
On Sat, 11 Oct 2003 13:01:04 +0100, "Simon Ashford" <simon@netlinkdata.co.uk>
wrote: >PHP 4.3.1 > >Any scripts I try which use a POST to send data gathered from an HTML page >to a PHP script don't appear to pass the information on. > >I have attached a couple of examples of the code I am trying to use: > >1. access2.php is accessed and reads the contents of a file allowing me to >edit the contents within a textarea. When I click submit the parameter >'filecontents' should be passed to the next page writeaccess2.php via a >POST. writeaccess2.php should then write the contents of variable >$filecontents back to the file. I just end up with a blank file after >clicking submit which would indicate no parameter passed. http://www.php.net/manual/en/languag...predefined.php Use $_POST['filecontents']. -- Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |
|
|||
|
Thanks Andy,
Actually finally found the problem!!! Haven't used this newer version of PHP until recently and the register globals is now off by default disabling parameters from being passed from one page to the next via POST in the php.ini. Full explanation here: http://uk2.php.net/register_globals -- Simon Ashford MCP IT Consultant, Netlink Data Solutions Limited. "Andy Hassall" <andy@andyh.co.uk> wrote in message news:catfovg9857ejrldfrm05mb6r8o80m278o@4ax.com... > On Sat, 11 Oct 2003 13:01:04 +0100, "Simon Ashford" <simon@netlinkdata.co.uk> > wrote: > > >PHP 4.3.1 > > > >Any scripts I try which use a POST to send data gathered from an HTML page > >to a PHP script don't appear to pass the information on. > > > >I have attached a couple of examples of the code I am trying to use: > > > >1. access2.php is accessed and reads the contents of a file allowing me to > >edit the contents within a textarea. When I click submit the parameter > >'filecontents' should be passed to the next page writeaccess2.php via a > >POST. writeaccess2.php should then write the contents of variable > >$filecontents back to the file. I just end up with a blank file after > >clicking submit which would indicate no parameter passed. > > http://www.php.net/manual/en/languag...predefined.php > > Use $_POST['filecontents']. > > -- > Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |