php.net |  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
 [2008-03-18 07:58 UTC] merylf at iinet dot net dot au
Description:
------------
When posting data from a form, the $_POST array is empty.

Reproduce code:
---------------
Handler:
<?php

print_r($_POST);

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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-18 16:59 UTC] colder@php.net
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 http://www.php.net/support.php 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-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 13 08:01:24 2019 UTC