Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging $_GET and $_POST #8

Closed
HassanAlthaf opened this issue Oct 4, 2015 · 1 comment
Closed

Merging $_GET and $_POST #8

HassanAlthaf opened this issue Oct 4, 2015 · 1 comment

Comments

@HassanAlthaf
Copy link
Contributor

https://github.com/PatrickLouys/http/blob/master/src/HttpRequest.php#L19

As you may as well know, you merged the $_GET and $_POST. I think you shouldn't merge them. Why? Imagine this scenario:

Lets say you have a $_GET parameter of key "foo", and at the same time, you submit a form with POST with the same key "foo", and once you merge them, don't you think either one of them will be lost? Therefore, I'd recommend you to split them.

Credits: @samayo for finding out and submitting this argument. I posted this on behalf of him because he is busy.

@PatrickLouys
Copy link
Owner

I am aware of that. It was a design choice made on purpose at the time. Mixing GET and POST is not a good idea anyway, especially with the same parameter name. In the end it's just a bunch of parameters that you send to the application.

I'll close this for now. If you have other arguments for a split of the parameters let me know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants