Jump to content

how to secure properly


divinedesigns1

Recommended Posts

Hey can someone point me in the right direct to secure and filtering PHP variables properly or the correct way....at the moment I am using stripslashes, etc.which to me seem a little basic, I learn a lot from when I first started using this forum, so I would like to learn securities for phpalso I would like to be pointed to a good source to learn JavaScript or a good book for such script.would greatly appreciate it, especially any advice or source for the PHP security

Link to comment
Share on other sites

It depends on what the value is going to be used for. If it's going to be used on a page use htmlspecialchars() to prevent people from messing up the HTML, if it's going to be used in a database you can use prepared statements or pass the value through mysqli_real_escape_string().

Link to comment
Share on other sites

It depends on what the value is going to be used for. If it's going to be used on a page use htmlspecialchars() to prevent people from messing up the HTML, if it's going to be used in a database you can use prepared statements or pass the value through mysqli_real_escape_string().

oh ok, well i use mysqli_real_escape_string() for database

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...