Leppy Posted July 7, 2007 Share Posted July 7, 2007 Hello, I would like to know if there is any functions I should use on every data entered by a user before making my SQL query to make it secure so the user cannot try to mess with the database? I usually do addslashes sometimes but is there a function that I could use on every variable that I will use in my SQL query that would make it secure in everyway? Basically what I'm asking is what is the best secure way of making mySQL queries. Thank you! Link to comment https://forums.phpfreaks.com/topic/58807-solved-secure-mysql-queries/ Share on other sites More sharing options...
pocobueno1388 Posted July 7, 2007 Share Posted July 7, 2007 mysql_real_escape_string() www.php.net/mysql_real_escape_string That function was specifically made for making variables safe for queries. Link to comment https://forums.phpfreaks.com/topic/58807-solved-secure-mysql-queries/#findComment-291780 Share on other sites More sharing options...
Leppy Posted July 7, 2007 Author Share Posted July 7, 2007 Ahhh that's what I was looking for, thank you!! Link to comment https://forums.phpfreaks.com/topic/58807-solved-secure-mysql-queries/#findComment-291873 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.