If anyone can suggest secuirty techniques for php coding? how to make your php code more secure ?
Thanks
If anyone can suggest secuirty techniques for php coding? how to make your php code more secure ?
Thanks
Never trusting the user, and each project having clearly defined data flows where input from the user is sanitized as soon as possible (preferably before any chance of output)
Always using some form of PDO. (In other words never ever using raw SQL). Mistakes have a habit of creeping in when trying to quickly fix bugs.
Never using variables in includes. It may seem like an easy solution, but it is usually a messy one that allows the user to request files they shouldn't.
Salt all passwords with a unique salt and then hash them, md5() is not an ideal function for this as it has weaknesses.
Follow these key points: