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

  • Home
  • SEARCH
  • 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 6706909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:34:32+00:00 2026-05-26T07:34:32+00:00

$comment= mysql_real_escape_string($comment); I use this.. But it doesnt help. I use TinyMCE to insert

  • 0
 $comment= mysql_real_escape_string($comment);

I use this.. But it doesnt help. I use TinyMCE to insert strings to my database, but on selection I get weird characters…

× ×›×ª×‘ על ידי
\\r\\n

\r\n
\r\n

Is thre to parse/enode the string before it goes to the database?!? without this happening?

UPDATE:

This is how the text that goes into the database looks like:

   t;div class=\"entry\" style=\"padding-top: 20px; padding-right: 20px; padding-bottom: 10px; padding-left: 20px; margin:

0px;\">\r\n<div class=\"entrymeta\"
style=\"padding: 0px; margin: 0px;\">osted on 15.10.2011
at 11:04 in&nbsp;<a style=\"color: #c02e13;
text-decoration: none; padding: 0px; margin: 0px;\"
title=\"View all posts in Games\"
href=\"http://www.rlslog.net/category/games/\"
rel=\"category tag\">Games</a>,&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\" title=\"View all posts in PC\"
href=\"http://www.rlslog.net/category/games/pc/\"
rel=\"category
tag\">PC</a>&nbsp;by&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\" title=\"Posts by Frado\"
href=\"http://www.rlslog.net/author/frado/\">Frado</a></div>\r\n<div
class=\"entrybody\" style=\"padding: 0px; margin:
0px;\">\r\n<p style=\"padding-top: 1em; padding-right:
0px; padding-bottom: 0px; padding-left: 0px; line-height: 19px;
margin: 0px;\">SKIDROW releases a fix for Orcs Must Die, read
the NFO for details.</p>\r\n<p style=\"padding-top: 1em;
padding-right: 0px; padding-bottom: 0px; padding-left: 0px;
line-height: 19px; margin: 0px;\"><strong
style=\"padding: 0px; margin:
0px;\">Description</strong>: Slice them, burn them,
skewer them, and launch them &ndash; no matter how you get it
done, orcs must die in this fantasy action-strategy game from Robot
Entertainment.As a powerful War Mage with dozens of deadly weapons,
spells, and traps at your fingertips, defend twenty-four fortresses
from a rampaging mob of beastly enemies, including ogres, hellbats,
and of course, a whole bunch of ugly orcs. Battle your enemies through
a story-based campaign across multiple difficulty levels, including
brutal Nightmare mode!</p>\r\n<p style=\"padding-top:
1em; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;
line-height: 19px; margin: 0px;\"
align=\"center\"><img style=\"border-width: 1px;
border-color: #cccccc; border-style: solid; padding: 5px; margin:
5px;\" src=\"http://i27.lulzimg.com/4a9c85ba50.jpg\"
alt=\"\" width=\"493\" height=\"278\"
/></p>\r\n<p style=\"padding-top: 1em; padding-right:
0px; padding-bottom: 0px; padding-left: 0px; line-height: 19px;
margin: 0px;\"><strong style=\"padding: 0px; margin:
0px;\"><br style=\"padding: 0px; margin: 0px;\"
/></strong></p>\r\n<p style=\"padding-top: 1em;
padding-right: 0px; padding-bottom: 0px; padding-left: 0px;
line-height: 19px; margin: 0px;\"><strong
style=\"padding: 0px; margin: 0px;\">Release
name</strong>: Orcs.Must.Die.Fix-SKIDROW<br
style=\"padding: 0px; margin: 0px;\" /><strong
style=\"padding: 0px; margin: 0px;\">Size</strong>:
39,1 KB<br style=\"padding: 0px; margin: 0px;\"
/><strong style=\"padding: 0px; margin:
0px;\">Links</strong>:&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://www.robotentertainment.com/games/orcsmustdie\">Homepage</a>&nbsp;&ndash;&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://store.steampowered.com/app/102600/\">Steam</a>&nbsp;&ndash;&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://uk.pc.ign.com/objects/080/080529.html\">iGN</a>&nbsp;&ndash;&nbsp;<a style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://www.gametrailers.com/game/orcs-must-die/14641\">Gametrailers</a>&nbsp;&ndash;&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://nfo.rlslog.net/view/29500\">NFO</a></p>\r\n<p
style=\"padding-top: 1em; padding-right: 0px; padding-bottom:
0px; padding-left: 0px; line-height: 19px; margin:
0px;\"><strong style=\"padding: 0px; margin:
0px;\">Download</strong>:&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://www.filesonic.com/file/2568940201\">FiLESONiC&nbsp;</a>-&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://www.fileserve.com/file/RsfZMT4\">FiLESERVE</a>&nbsp;&ndash;&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://www.newtorrents.info/search/Orcs.Must.Die.Fix-SKIDROW\">NTi</a></p>\r\n<p
style=\"padding-top: 1em; padding-right: 0px; padding-bottom:
0px; padding-left: 0px; line-height: 19px; margin:
0px;\"><iframe style=\"border-width: initial;
border-color: initial; overflow-x: hidden; overflow-y: hidden; width:
450px; height: 35px; border-style: none; padding: 0px; margin:
0px;\"
src=\"http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.rlslog.net%2Forcs-must-die-fix-skidrow%2F&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=35\"
frameborder=\"0\"
scrolling=\"no\"></iframe></p>\r\n<p
class=\"comments_link\" style=\"padding-top: 20px;
padding-right: 0px; padding-bottom: 10px; padding-left: 0px;
line-height: 19px; margin: 0px;\"><a style=\"color:

c02e13; text-decoration: none; padding: 0px; margin: 0px;\" title=\"Comment on Orcs Must Die Fix-SKIDROW\"

href=\"http://www.rlslog.net/orcs-must-die-fix-skidrow/#respond\">Comments(0)</a></p>\r\n</div>\r\n</div>\r\n<div
style=\"padding-top: 0px; padding-right: 0px; padding-bottom:
0px; padding-left: 40px; margin: 0px;\"><iframe
style=\"padding: 0px; margin: 0px;\"
src=\"http://www.roadcomponentsdb.com/300.htm\"
frameborder=\"0\" marginwidth=\"0\"
marginheight=\"0\" scrolling=\"NO\"
width=\"300\"
height=\"250\"></iframe></div>\r\n<p
id=\"nextlinks\" style=\"padding-top: 20px;
padding-right: 20px; padding-bottom: 0px; padding-left: 20px; margin:
0px;\"><strong style=\"padding: 0px; margin:
0px;\">Previous post:</strong>&nbsp;<a
style=\"color: #c02e13; text-decoration: none; padding: 0px;
margin: 0px;\"
href=\"http://www.rlslog.net/musclemag-international-%e2%80%93-december-2011-p2p/\">MuscleMag
International &ndash; December 2011-P2P</a></p>

  • 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-26T07:34:33+00:00Added an answer on May 26, 2026 at 7:34 am

    Two suggestions:

    1. Ditch the mysql_XXX API. It’s going to be scrapped at some point, and it lacks crucial features, most notably parametrized queries. If you don’t know what parametrized queries are, go read. They’re the only sane way of keeping your SQL connectivity code sane. For PHP, I’d recommend PDO – it’s a tad bit less straightforward, but it is well worth the learning curve.
    2. Make sure your charsets / encodings are correct. The easiest thing to do these days is to use Unicode (utf-8) for everything. You need to set the encoding in the database itself (if you can; in MySQL you need to do this per table and per column, which can be quite a hassle if you have to retro-fit it), the connection encoding (just call SET NAMES UTF-8 first thing after you establish a connection), php’s internal encoding (mb_internal_encoding), and the output encoding (mb_http_output). Also, make sure you are actually outputting UTF-8; this means that all your source files and templates should also be saved in utf-8 encoding.

    And whatever you do: NEVER EVER CONCATENATE OR SUBSTITUTE VALUES INTO QUERIES. Code like this: mysql_query("SELECT * FROM users WHERE USERNAME = '$username'"); should be illegal – there are just too many ways to shoot yourself in the foot with this and introduce SQL injection vulnerabilities. (And if you don’t know what SQL injection is, read up on that one too).

    Finally; a few hints on how you can debug your situation.

    • set up MySQL query logging. There’s a setting in my.ini which will cause the MySQL server to dump all incoming queries into a log file. You don’t want to do this on a production server, and you only want to enable it temporarily, but it’s a great tool to see what actually gets sent to the server.
    • log into MySQL using the command-line client, and see what it outputs if you fire the same queries manually.
    • debug your PHP – make sure the values you’re sending to the server are what you think they are – if you don’t have a debugger at hand, peppering your script with print statements is better than nothing (just remember to remove them before committing)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Comment on Duplicate Reference: Why would this be marked duplicate when it was asked
The comment to this answer got me wondering. I've always thought that C was
This comment confuses me: kill -l generally lists all signals. I thought that a
$.Comment = function() { this.alertme = Alert!; } $.Comment.prototype.send = function() { var self
I saw this comment.... http://www.php.net/manual/en/function.mysql-real-escape-string.php#93005 And began to wonder why this would be a
mysql_query(insert into mytable (flow,holderid,amount,operator,ip,product,taskid,comment)values('-1','$memberid','$sum+5','$memberid','$ip','Expertise','$taskid','Publish a problem or task') )or die(mysql_error()); I get an error
My MySQL query is this: INSERT INTO CONTACTER_NOUS('id_contact', 'societe', 'civilite', 'prenom', 'nom', 'adress', 'ville',
in order to keep safe was told to use mysql_real_escape_string before sending to Mysql
This query appears in mysql slow query log: it takes 11 seconds. INSERT INTO
Code in inc/q/prof.php: <?php // Insert Comments into Database that user provides $comm =

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.