View Single Post
Old 11-10-2009, 08:51 PM   #1 (permalink)
captainmerton
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default real_escape_string

I'm having issues with the way this php function works. Its worked fine on PHP5, MYSQL5 on my XP laptop. I'm using it for comment text entered into a comment form. When i handle strings like "jim's comment" or "Jim\s comment" etc it makes sure the exactly what has been entered appears in the database. However I have implemented the code onto Linux and now it goes nuts when i add comments etc it is adding in backslashes etc any idea why this would be. The code is:

PHP Code:
$this->commenttext $this->mysqli->real_escape_string($this->commenttext); 

Last edited by captainmerton : 11-11-2009 at 10:12 AM.
captainmerton is offline  
Reply With Quote