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! Quote Link to comment 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. Quote Link to comment 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!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.