Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7593785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:15:22+00:00 2026-05-30T21:15:22+00:00

I use mysql_real_escape_string() before interting information in the database, but when I want to

  • 0

I use mysql_real_escape_string() before interting information in the database, but when I want to show the data from the database, ‘ is replaced with \’.
So how can I get rid of that backslash? Is there a function that reverses mysql_real_escape_string()?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:15:23+00:00Added an answer on May 30, 2026 at 9:15 pm
    1. There is NO [built-in] function to reverse mysql_real_escape_string.
    2. If you have only quotes but not linebreaks escaped – it is not mysql_real_escape_string to blame.
    3. Instead of stripping, you apparently have to make your code not to add them.
    4. There are 2 possible reasons for the slashes to appear:
      • magic_quotes_gpc is turned on. Just turn it off.
      • some extra-wise-data-sanitize function in charge. Get rid of it.
    5. Just to make sure: not whatever “information” but only strings (query parts enclosed in quotes) have to be escaped. For the any other query part escaping is useless and you have to find another way to protect them from SQL injection
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I normally just use mysql_real_escape_string on every variable before inserting to my database, so
Just wondering, to sanitize user input, I use mysql_real_escape_string() on data before it is
i am trying escape some data before it goes into my database, but i
in typical PHP applications I used to use mysql_real_escape_string before I did SQL inserts.
I'm inserting some HTML into a MySQL database table. But when I get it
i'm trying to save data to database and i get an error i never
in order to keep safe was told to use mysql_real_escape_string before sending to Mysql
Kohana mentions they use mysql_real_escape_string to sanitize database inputs in their documentation. However, while
Question 1 : Can I just use $userid = mysql_real_escape_string($_GET['user_id']); Or I need to
$comment= mysql_real_escape_string($comment); I use this.. But it doesnt help. I use TinyMCE to insert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.