I`ve finished my website,its a social netwrk web in PHP.
Now before i lunch it,i would like to know what are the precautions i should take to protect it from hackers.
please if any one has idea on what i should do,to protect mysql,and my site as a whole.i will be greatefull if u`ll leave me ur suggestions.
mrcniceguy
5
Posting Whiz in Training
Recommended Answers
Jump to Postmysql_real_escape_string()
Jump to PostWell for one, I would use
mysql_real_escape()
on any variable you are passing to MySQL. That should prevent any kind of MySQL injection. I would make sure that your passwords are hashed correctly (usingmd5()
orsha1()
). For added security I would salt your encryptions. See
Jump to PostWell this is definitely an improvement! I believe you problem lies in the fact that the passwords in the database aren't hashed using md5(). You need to create a temporary PHP file on your site with just one line of code:
echo md5("password here");
Then all …
Jump to PostYou will know if magic_quotes_gpc is on by asking your host (If they have the latest version of PHP it shouldn't be!). That might not be it. The only way for us to help you is if you post your code.
Jump to Postyes that is also a corect statement but u also need to do this for the registration as well because it is actually inserting into the database there is more of a risk
All 27 Replies
SKANK!!!!!
5
Posting Pro in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
SKANK!!!!!
5
Posting Pro in Training
BzzBee
5
Posting Whiz
Besherek
0
Light Poster
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
mrcniceguy
5
Posting Whiz in Training
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
somedude3488
228
Nearly a Posting Virtuoso
mrcniceguy
5
Posting Whiz in Training
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.