Two anti slashes too many
In one of my Web page, the user keys in:
in a field named nom.
Before writing this into MySql, I normalize the value with:
When I go and look into MySql via PhpMyAdmin, the column contents:
$nom = mysql_real_escape_string($nom);
How could I avoid these 2 extra anti slashes?
Thank you in advance for your help.
When you retrieve the values from your MySQL database, use stripslashes() in your PHP script, as in:
That will remove the slashes inserted by mysql_real_escape_string(). Good luck!
$nom = stripslashes($row['nom']);
Yes, the stripslashes() did the work just perfectly.
Thank you for your kind help.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)