Posts by Pedro Simões • 539 points
4 posts
-
35
votes9
answers12451
viewsA: How to prevent SQL code injection into my PHP code?
Simply don’t use string concatenation, always use SQL parameters, or a lib that does it for you. In your example with parameter the user would insert '1); DROP TABLE Products;' in the column, if…
-
0
votes5
answers1944
viewsA: PHP MVC - Adding CSS, Images etc
Exactly what you want, mod_rewrite solves the question as Patrick answered, but elaborating a little more, the . htaccess may not be considered the most "stylish" option, and not all php web Servers…
-
7
votes3
answers3943
viewsA: Alternatives to MVC for web applications
Boas Calebe, MVC is a great choice of Pattern for a web application, although it was created for desktop applications, it is a perfect choice for the web as it separates the various…
-
1
votes1
answer1095
viewsA: How to pass data to all views in a MVC pattern?
Good, the problem you present seems to me easy to solve, the controllers in which you need to define a header and a footer just hardam a controller that has this data. example: <?php class…