$_POST isn't working all the time

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 2
Joined: Sat Sep 20, 2003 9:51 am

$_POST isn't working all the time

Postby Lee » Sat Sep 20, 2003 9:59 am

I've been using PHP (and perl) for quite a while and consider myself fairly seasoned in the scripting language; however, I have come across something that has stumped me, which has led me to post herein.

I have an index.php file which upon loading searches the same directory for files ending in a certain extension and automatically 'including' them with the file. Each file that is included is associated with a page number so that when a user passes a specific page number (i.e. http://mypage.com/?50), the included php script which has the page 50 functions is called. (Did all that make sense?)

On this last function I was writing, I have a form. When I go to POST the input, $_POST does NOT populate with those values. However, when I wrote the first edition of this site I used pretty much the same script, just different backbone. Just streamlining it this time. However, there really isn't much to $_POST. A user submits and $_POST gets populated.

I say all that to say this: Has anyone encountered any problems populating $_POST only sometimes or within certain routines? Normally (on the same server) it works just fine. Is there something that can 'cancel out' a $_POST? I just really puzzled here. I've spent three days on this issue and really want to move on. Any insight would be GREATLY appreciated. Thanks.

New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Postby pootergeist » Sat Sep 20, 2003 11:01 am

well firstly ?50 would be accessed through $_GET or $_REQUEST and secondly - without seeing your form code and associated php receiving code we'd simply be trying blindly to guess at where your script has snags.

New php-forum User
New php-forum User
Posts: 18
Joined: Fri Oct 04, 2002 8:09 pm

Postby ednark » Sun Sep 21, 2003 7:17 am

also make sure on your forms you did not forget to do
<form method="post">

Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot] and 6 guests