UI Deploy

Curated, Short, Web UI Dev we Love.

10 awesome PHP functions and snippets

Every web developer should keep useful code snippets in a personal library for future reference. Today, I’m showing you the 10 most useful snippets and functions I have added to my snippet library from the past 3 months.

Sanitize database inputs

When inserting data in your database, you have to be really careful about SQL injections and other attempts to insert malicious data into the db. The function below is probably the most complete and efficient way to sanitize a string before using it with your database.

view source

Advertisement