Jump to content

[SOLVED] Data not being escaped? - [ Mysqli, phpmyadmin ]


Boo-urns

Recommended Posts

I have my data running through mysqli_real_escape_string before I send it to the database. However I notice when I look at the data in the database it appears to not be escaped. Does the mysqli class automatically escape data? As, I don't think my data is being escaped (when i set it up w/o the real_escape_string) but when I echo out the query it is.

 

Does this version of PhpMyAdmin 2.11.9.4 display data with stripslashes?

 

Thanks!

Link to comment
Share on other sites

basically escaping the data is to get it successfully to the database

 

if inside your string somewhere you have a ' it will kill the query

 

thats why it turns ' into \', but when it reaches the database it will have been escaped in the query, therefore it will show up correct in the database, you most likely as wolf states gave magic quotes on, so, you'd want to stripslahes

Link to comment
Share on other sites

The escape characters \ are NOT inserted into the database. They are only present in the query string to indicate which special characters are to be treated as data and which are to be treated as part of the query syntax.

 

^^ yeah basically what I said, but probably more understandable lol

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.