0

I have the following form:

<form name="mainLogin" class="Login" action="login.php" method="post">
<p><label for="user">Username</label><input type="text" name="user" class="field" value="" /></p>
<p><label for="pass">Password</label><input type="password" name="loginpass" class="field" /></p>
<p><label for="remember">Remember Me</label><input type="checkbox" name="remember" /></p>
<p class="submit"><input type="submit" name="submit" class="submit" value="Submit"/></p>
</form>

When I submit the form, the request method is correctly detected as a POST method via:

   $post = $_SERVER['REQUEST_METHOD'] == 'POST' ? TRUE : FALSE;

Which returns a value of 1, so it does recognize that it is a post method from my understanding.

I can check the values from the submission here:

print "CONTENT_TYPE: " . $_SERVER['CONTENT_TYPE'] . "<BR />";
$data = file_get_contents('php://input');
print "DATA: <pre>";
print "data dump:";
var_dump($data);
print "post dump:";
var_dump($_POST);
print "request dump:";
var_dump($_REQUEST);
print "</pre>";

- And the output:

CONTENT_TYPE: application/x-www-form-urlencoded
DATA:
data dump:string(54) "user=iamauser&loginpass=hereismypassword&submit=Submit"
post dump:NULL
request dump:array(7) {
  ["user"]=>
  string(8) "iamauser"
  ["loginpass"]=>
  string(16) "hereismypassword"
  ["submit"]=>
  string(6) "Submit"
  ["umnmobileprompted"]=>
  string(1) "1"
  ["s_fid"]=>
  string(33) "18220EB1AE5FB45B-1C283313CA70F773"
  ["s_lv"]=>
  string(13) "1382110868576"
  ["PHPSESSID"]=>
  string(26) "52954uech9k413ssk62kvsmdb4"
}

This web form use to work, I am unaware of any changes, although I am not sure if something has changed on the server the site is configured under. Before I go to them, I was wondering what I should be looking for, and what I should be asking them that might cause this behavior.

Here is the requested outputs:

print_r post says: 1
var_dump iniget post max size says: string(2) "8M" 
var_dump server request method says: string(4) "POST"
J M
  • 203
  • 1
  • 10

1 Answers1

0

This has been resolved.

It was unrelated to the $_POST data, but to an old function in the processing that was used to strip magic quotes off the $_POST data. No data was being returned if magic quotes were, in fact, off, so it was being returned empty.

J M
  • 203
  • 1
  • 10