another way to use mysql_real_escape_string instead trim(stripslashes(

Mobile
feeds
Welcome Login | Register

another way to use mysql_real_escape_string instead trim(stripslashes(
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » MYSQL Forums
        » » another way to use mysql_real_escape_string instead trim(stripslashes(
another way to use mysql_real_escape_string instead trim(stripslashes(
Post Description: another way to use mysql real escape string instead trimstripslashes MYSQL
Post Tags:
This Post Has Been Viewed 1134 Times Since Sun Feb 10, 2008 5:28 pm Author hostman with 6 replies
another way to use mysql_real_escape_string instead trim(stripslashes(
Advertise On This Page




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']))


Leave Your Comments

Share:   Subscribe - Keep Up With This Topic
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
Fourms BBCODE:
Links Related to : another way to use mysql_real_escape_string instead trim(stripslashes(
Add Link:

Comments and replies About another way to use mysql_real_escape_string instead trim(stripslashes(
:: 1 :: Reply #64155 Reply By Wayne On Thu Jul 31, 2008 8:11 am
Wayne:
no. stripslashes can be fooled. mysql_real_escape_string is the only action to take against sql injection
:: 2 :: Reply #64812 Reply By ditro On Mon Aug 04, 2008 11:05 am
ditro:
sql error similar
:: 3 :: Reply #64813 Reply By erew On Mon Aug 04, 2008 11:06 am
erew:
what.is
:: 4 :: Reply #94418 Reply By shawn On Thu Feb 19, 2009 12:38 pm
shawn:
this is wrong... the function would be addslashes. e.g., trim(addslashes($_post['somedata'
:: 5 :: Reply #94604 Reply By This guy. On Sat Feb 21, 2009 10:26 am
This guy.:
this is horribly wrong, do not use this advice.
:: 6 :: Reply #105078 Reply By horrified On Tue Jun 02, 2009 1:35 am
horrified:
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