Category Archives: Databases

Preventing SQL Injection

For anyone who needs it, here is a script I wrote to prevent SQL injection. It uses references to the original global arrays to clean them up.

 

/**

 * added the following code to enabled readyness for magic_quotes() being removed

 * in PHP6

 *

 * added by C. Cook 15/8/2008

 */

//Turn off magic quotes the manual way, this also [...]

Also posted in Computer Security, Web Development | Tagged , | Leave a comment

Database development – Some Rules

If I’d known this stuff when I first started to design databases for web applications, I think it would have helped me a lot, these are not necessarily ‘formal recommendations’ or even what some people might call ‘best practice’, but these rules work for me when I’m designing my web applications. It makes development quicker, [...]

Also posted in Web Development | Tagged , , | Leave a comment

How to backup and email a dump of your Mysql database on Linux

A few weeks back, after working on an old, slow & clunking server that I use to run a billing system, I thought to myself ‘hey you know what, it would be great to be able to email myself backups of my MySQL database. That will stop me worrying about loosing all this data if [...]

Also posted in Computer Security, Web Development | Tagged | 1 Comment