+ 1

Php security

Hello guys and ladies I'm a beginner PHP developer and I have created my own CMS and I use this code to prevent vulnerabilities: Function escape($data){ $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); $data = mysqli_real_escape_string($data); return $data; } And Everytime I receive data I use this function to avoid from SQL injection, XSS and Other vulnerabilities. Please help me make it better and say your opinion.

1st Sep 2020, 1:09 PM
Mohammad
Mohammad - avatar
2 Antworten
+ 2
1st Sep 2020, 3:18 PM
Ipang
+ 1
👍
1st Sep 2020, 1:17 PM
Shadoff
Shadoff - avatar