Wallpapers Forums Login

Another Way To Use Mysql_real_escape_string Instead Trim(stripslashes(

sometimes mysql doesn't let you insert data into your database unless its cleaned.

an good way to do this is with the function: mysql_real_escape_string()

example: mysql_real_escape_string($_POST['somedata'])


but its better to use this instead:
trim(stripslashes($_POST['somedata']))

WARNING: but if you have a website, you MUST use mysql_real_escape_string() for security
i20 Sat Jul 18, 2009
first it's not strip but addslashes to escape illegal characters and second nothing can replace mysql_real_escape_string() for stop injection because this function has been created exactly to protect your mysql_query!! "trim(stripslashes($_post['someda is a joke!
horrified Tue Jun 02, 2009
stripslashes, to sanatise pre-db entry?

is this site a hacking site wanting people to have hghly insecure scripts?

anyone reading this, forget add and strip slashes. use mysql_real_escape_string()

i you get slashes from php from some other place, then use stripslashes by all means
This Sat Feb 21, 2009
this is horribly wrong, do not use this advice.
shawn Thu Feb 19, 2009
this is wrong... the function would be addslashes. e.g., trim(addslashes($_post['somedata'
erew Mon Aug 04, 2008
what.is
ditro Mon Aug 04, 2008
sql error similar
Wayne Thu Jul 31, 2008
no. stripslashes can be fooled. mysql_real_escape_string is the only action to take against sql injection

Related Content

Information

Share

wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5