1 - PHP has several problems with language design, core implementations, etc (many of these are legacy-related). It's also easy to get started with, which leads to a community with a large percentage of newbies making silly mistakes.
2 - (a lot of) programmers are elitists, bandwagon-lovers, or just trying to fit in; PHP is an easy target for the things I mentioned in the first point.
I shared this project for the first time in this very subreddit, some 2 years ago, while it was still called "damnit". Some 5 million packagist downloads later it's still going strong, in great part thanks to the help of one the project's early contributors, denis-sokolov, who I can't praise enough.
I've been working on a redesign of the error page for quite a while, and it's been recently released, along with some other goodies and bug fixes.
1 - PHP has several problems with language design, core implementations, etc (many of these are legacy-related). It's also easy to get started with, which leads to a community with a large percentage of newbies making silly mistakes.
2 - (a lot of) programmers are elitists, bandwagon-lovers, or just trying to fit in; PHP is an easy target for the things I mentioned in the first point.
It makes my variables look like a million bucks. $$$
This is called CSRF, Cross-Site Request Forgery.
There are a two simple things you do to prevent this scenario.
Respect the HTTP specification - know the difference between a GET and POST request.
Require a unique secret token to be sent along with every POST submission. This is done by generating a secret string as a hidden form field:
<input type="hidden" value="<?= .. secret .. ?>">This token is saved with the user's session - when the user submits the form, the token is sent along, and must match the one saved with the session.
For this specific scenario, you'll also want to request the old password before allowing the user to change it.
/r/PHPFramework helps you save server resources by offloading the costly process of building SQL strings to the client, with the power of javascript!
I shared this project for the first time in this very subreddit, some 2 years ago, while it was still called "damnit". Some 5 million packagist downloads later it's still going strong, in great part thanks to the help of one the project's early contributors, denis-sokolov, who I can't praise enough.
I've been working on a redesign of the error page for quite a while, and it's been recently released, along with some other goodies and bug fixes.