Open Legion112 opened 3 years ago
Here some of the idea on how to do that https://github.com/HenintsoaHARINORO/ExoPHP/pull/2
@HenintsoaHARINORO Do you have any more questions or lack of understanding of my pull request? If not, I suggest merging it.
@HenintsoaHARINORO try to test your current pages about this vulnerability https://github.com/HenintsoaHARINORO/ExoPHP/issues/3. After try to refactor all your pages to use twig as you can see here https://github.com/HenintsoaHARINORO/ExoPHP/blob/7f4571b302bc5db909f12d923507d5d28f39de48/index.php#L19
I have to learn about MVC first then
@HenintsoaHARINORO I will close the issue by myself when there will be no mixing of PHP and HTML
@HenintsoaHARINORO refactor it to use twig https://github.com/HenintsoaHARINORO/ExoPHP/blob/main/triangle.php https://github.com/HenintsoaHARINORO/ExoPHP/blob/main/multiplication.php
Consider separating the PHP logic layer and presentation layer (HTML) into separate files. https://github.com/HenintsoaHARINORO/ExoPHP/blob/593d3864206c2c3d05cebd17f521cd5cf0ad1b7e/triangle.php#L53
There are patterns called MVC. It's about separating your business logic into a model, processing user requests into controllers (Working with global variables such as $_POST, $_GET), and the response representation into a separate file in your case its HTML.