Apache/PHP using POST doesn't seem to pass parameters?

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. ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-11-2003
Simon Ashford
 
Posts: n/a
Default Apache/PHP using POST doesn't seem to pass parameters?

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.


  #2 (permalink)  
Old 10-11-2003
Andy Hassall
 
Posts: n/a
Default Re: Apache/PHP using POST doesn't seem to pass parameters?

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)
  #3 (permalink)  
Old 10-11-2003
Simon Ashford
 
Posts: n/a
Default Re: Apache/PHP using POST doesn't seem to pass parameters?

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)



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:02 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0