Darkling
Active Member
Hi all
I am submitting from a form to another php page which is supposed to process it. The problem is that the $_POST is often empty when I try to read it.
This is a simplified version of the form for testing:
And this is the processing page:
This will usually output nothing but Array (), but sometimes the data will come through first time. When the $_POST is empty, I can hit Back and then resubmit and after a few tries, it will work.
I have inspected the whole shebang with FireBug and it seems that the $_POST is getting cleared because the processing page does a 302 redirect back to itself (that obviously uses a GET, and so the POST data is discarded).
I have googled this to death, but none of the answers I have found have been any help. The following are NOT the problem: 1. post_max_size is set to 8M (not MB) 2. There is no CONTENT_TYPE issue
Other PHP apps are working fine on the server (Wordpress etc), and I am using PHP 5.2.9.
I am totally stumped on this one - so thanks for ANY ideas and help!
Big important note: I have only ever seen this happen when I am connected via SAIX. As soon as I go to an IS connection, everything works nicely.
I am submitting from a form to another php page which is supposed to process it. The problem is that the $_POST is often empty when I try to read it.
This is a simplified version of the form for testing:
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Order Form</title>
</head>
<body>
<form id="mailorder" name="mailorder" action="mailordertest.php" method="post">
<input type="hidden" name="A212-M" value="1" />
<input type="hidden" name="A212-XXXL" value="2" />
<input type="hidden" name="A212-XXL" value="3" />
<input type="hidden" name="A212-XL" value="4" />
<input type="submit" value="Confirm Order">
</form>
</body>
</html>
And this is the processing page:
PHP:
<?php
session_start();
error_reporting(E_ALL);
print_r($_POST);
?>
This will usually output nothing but Array (), but sometimes the data will come through first time. When the $_POST is empty, I can hit Back and then resubmit and after a few tries, it will work.
I have inspected the whole shebang with FireBug and it seems that the $_POST is getting cleared because the processing page does a 302 redirect back to itself (that obviously uses a GET, and so the POST data is discarded).
I have googled this to death, but none of the answers I have found have been any help. The following are NOT the problem: 1. post_max_size is set to 8M (not MB) 2. There is no CONTENT_TYPE issue
Other PHP apps are working fine on the server (Wordpress etc), and I am using PHP 5.2.9.
I am totally stumped on this one - so thanks for ANY ideas and help!
Big important note: I have only ever seen this happen when I am connected via SAIX. As soon as I go to an IS connection, everything works nicely.