The best way for securing data going into database?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Domsore
Forum Commoner
Posts: 46
Joined: Wed Jan 26, 2011 7:07 pm

The best way for securing data going into database?

Post by Domsore »

I have brought this book on PHP and have had it for a while. Today I was thinking about security (just randomly.. quite odd) so I looked it up in this book. There are too many different things that have to be done in my opinion. It there not just one function that I could use to prevent any attacks?

Cheers,

Dom
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: The best way for securing data going into database?

Post by social_experiment »

Take a look at the Security section in the php manual, specificly about Databases. You can use mysql_real_escape_string() to ensure you aren't vulnerable to SQL Injection.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Domsore
Forum Commoner
Posts: 46
Joined: Wed Jan 26, 2011 7:07 pm

Re: The best way for securing data going into database?

Post by Domsore »

Oh thanks... I'm sort of disappointed I see no mention of this in my book.
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: The best way for securing data going into database?

Post by social_experiment »

Yeah you have to look for a book that's geared specifically to such a topic, or search the internet for articles about it.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply