Public bug reported:
I have tried fresh installs and currently this is off the flash drive
downloaded today from the site. I have searched for a week and half to
no avail. I was working on another project so i copied the short example
so that there would not be 100's of code lines,The funny thing is that
$_GET works fine I also uploaded to test site with my hosting company
they have php5.6 and it did the same
Thank You Pat
HERE IS THE CODE
<!DOCTYPE html>
<html>
<head>
<title> order form</title>
<link rel='stylesheet' type='text/css' href='css/prac.css' />
</head>
<body>
<form action = "processorder.php" mehtod = "post">
<table>
<tr>
<td class= "item">Item</td>
<td clas = "qty">Quanity</td>
</tr>
<tr>
<td>Tires</td>
<td><input type = "text" name = "tireqty" size="3" maxlength="3"
/></td>
</tr>
<tr>
<td>Oil</td>
<td><input type="text" name="oilqty" size="3" maxlength="3" /></td>
</tr>
<tr>
<td>Spark Plugs</td>
<td><input type="text" name="sparkqty" size="3" maxlength="3"</td>
</tr>
<tr>
<td class="sub" colspan="2"><input type="submit" value="submit
Order" /></td>
</tr>
</table>
</form>
</body>
</html>
<?php
var_dump($GLOBALS);
$tireqty = $_POST['tireqty'];
$oilqty = $_POST['oilqty'];
$sparkqty = $_POST['sparkqty'];
?>
<!DOCTYPE html>
<html>
<head>
<title>Bob's Auto Parts Order Results</title>
</head>
<body>
<h1> Bob's Auto Parts</h1>
<h2>Order Results</h2>
<?php
echo "<p>Order Processed at ";
echo date('H:i, jS F Y');
echo "</p>";
echo '<p>Your order is as follows;</p>';
echo htmlspecialchars($tireqty).' tires<br />';
echo htmlspecialchars($oilqty).' oil <br />';
echo htmlspecialchars($sparkqty).' spark plugs <br />';
echo '<pre>';
print_r($_POST);
?>
</body>
</html>
AND HERE IS THE RESULTS
array(5) { ["_GET"]=> array(3) { ["tireqty"]=> string(1) "4" ["oilqty"]=>
string(1) "4" ["sparkqty"]=> string(1) "2" } ["_POST"]=> array(0) { }
["_COOKIE"]=> array(0) { } ["_FILES"]=> array(0) { } ["GLOBALS"]=> array(5) {
["_GET"]=> array(3) { ["tireqty"]=> string(1) "4" ["oilqty"]=> string(1) "4"
["sparkqty"]=> string(1) "2" } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0)
{ } ["_FILES"]=> array(0) { } ["GLOBALS"]=> *RECURSION* } }
Bob's Auto Parts
Order Results
Order Processed at 18:12, 7th August 2018
Your order is as follows;
tires
oil
spark plugs
Array
(
)
** Affects: ubuntu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1785911
Title:
PHP $_POST Not working
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1785911/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs