note 100458 deleted from function.mysql-real-escape-string by philip

From: Date: Fri, 04 Sep 2015 20:05:33 +0000
Subject: note 100458 deleted from function.mysql-real-escape-string by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-203675@lists.php.net to get a copy of this message
Note Submitter: m-t at live dot fr ---- You should use mysql_real_escape_string only before inserting the data into your table, otherwise you could just use this function : function reverse_escape($str) { $search=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); $replace=array("\\","\0","\n","\r","\x1a","'",'"'); return str_replace($search,$replace,$str); }

« previous php.notes (#203675) next »