magic_quotes() and PHP form input...

seven7htangent

New Member
Messages
6
Reaction score
0
Points
0
i realise that to turn magic_quotes() off on my account, as i'm already using mysql_real_escape_string(), i need only ask an admin.

However, whenever i enter an HTML link via a form on my site, the result is that the HREF gets set as: http://www.mysite.com/\"http://www.link.com/\"

By my reasoning, this is a side-effect of magic_quotes() being on, but has anybody else encountered this problem and solved it?

Thanks in advance...
 

MasterMax1313

New Member
Messages
84
Reaction score
0
Points
0
you could try just using stripslashes on the variable to unescape the various characters that have been escaped after using mysql_real_escape_string(), that is if you haven't already done this.
 

seven7htangent

New Member
Messages
6
Reaction score
0
Points
0
i could, i realise, but as magic_quotes is deprecated, having been replaced by mysql_real_escape_string as a standard (which, i believe, escapes other problematic characters, as well), i would rather just have magic_quotes turned off...

Thanks for the advice, though. Cheers.
 
Top