Page 2 of 2
Re: $_GET works but $_POST doesn't
Posted: Fri Jul 09, 2010 6:17 pm
by wqian94
it's probably just my machine then
Re: $_GET works but $_POST doesn't
Posted: Fri Jul 09, 2010 7:24 pm
by agriz
While using POST method, did you try print_r($_REQUEST)
If it returns empty array, we can give up focusing GET method conversion
Re: $_GET works but $_POST doesn't
Posted: Sat Jul 10, 2010 5:48 pm
by cpetercarter
Is it possible that what you are seeing is just the result of caching by the browser. It might happen like this - you run the script with "get" in the form, and test to see the output. You then change "get" to "post" in the <form> tag, and run the script again, testing the output, There are, apparently, no POST variables. But although you think that you have run the script with POST in the form instead of GET, in fact the browser has cached the old version of your script and continues to use it. So, you can find no POST variables. If this makes sense, try clearing the browser cache each time before you run the script.
Re: $_GET works but $_POST doesn't
Posted: Sat Jul 10, 2010 9:10 pm
by JakeJ
Have you tested this in different browsers?
Are you testing it on a local server?
Oftentimes, IE will NOT send $_POST data without a privacy policy in place because of browser security.
So if you're uploading it to a place different than local and using IE, it's probably a privacy policy issue.
Re: $_GET works but $_POST doesn't
Posted: Sun Jul 11, 2010 2:27 am
by cpetercarter
JakeJ's suggestion sounds plausible. See
this.