9
The below may be a simple line of code, but it is extremely useful to help prevent SQL Injection. There are many other methods, such as removing certain values from your string, but this is by far superior, as it does not limit what can be inserted to your database.
5
Cyber-Drugs
Below is a very simple bit of code you can use to test a MySQL Database Connection.
5
Before any wars start, I want to clarify that the code below is NOT my own code, but unfortunately I am uncertain where I obtained it from. The code below basically create dynamic thumbnails of an image, you parse the following to it:
Image location,
Maximum Width
Maximum Height
It will then scale your image down, please do not confuse this with converting your image into a square, or whatever shape you are after. The code below will maintain aspect ratio of your image, and will use the values you parse as a guidline. Extremely handy when you are building gallery websites.
Image location,
Maximum Width
Maximum Height
It will then scale your image down, please do not confuse this with converting your image into a square, or whatever shape you are after. The code below will maintain aspect ratio of your image, and will use the values you parse as a guidline. Extremely handy when you are building gallery websites.
2
Cyber-Drugs
Below is a bit of code, which I needed to make when creating an application which did a lot of file manipulation. If you ever want to load the contents of a file, but remove X amount of lines from the end of the file, use the function below.
1
The below is an old bit of code I threw together when I was developing a Friend Networking site back in 2001. The site didn't last all that long, but I did manage to save all the handy snippets I used in it.
Below is code, which will return the age of somebody, when you parse their date of birth to it. I will probably make a cleaner version of the code at a later date and share it with everyone here.
Below is code, which will return the age of somebody, when you parse their date of birth to it. I will probably make a cleaner version of the code at a later date and share it with everyone here.
-6
great short-cut alternative to using simple if { }









