|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44466 $_POST array empty
Submitted: 2008-03-18 07:58 UTC Modified: 2008-03-19 23:40 UTC
From: merylf at iinet dot net dot au Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.2.5 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
20 - 14 = ?
Subscribe to this entry?

 [2008-03-18 07:58 UTC] merylf at iinet dot net dot au
When posting data from a form, the $_POST array is empty.

Reproduce code:


if (strlen($_POST['yourname']) > 0) {
echo '<p>There is a name</p>';
} else {  
echo '<p>You must enter your name.</p>'; 
Form bits:

<form id="cisform" action="handle_cis_form.php" method="post">
<fieldset><legend>CIS Form</legend>
<p><label for="originator">Your name:</label>
<input type="text" id="yourname" /></p>

Expected result:
$_POST['yourname'] should have a value when the form is submitted, but it is empty.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-18 16:59 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Input elements that don't have names won't get sent.

 [2008-03-19 23:40 UTC] merylf at iinet dot net dot au
My apologies for being a complete idiot.  And thanks for your help, much appreciated!
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Oct 18 01:03:39 2021 UTC