0

Hi I added a addslash before submit to database like

$bio=addslashes($_POST('bio'));

it will add a "\'" before submit .. and everything working fine .. but at the time of edit/ resubmit this form I am getting the following out put

This is old\\' Line
This is new\' Line

Please help me to avoid this issue ..
Thanks in advance

3
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by hakeemtunde
0

Addslashes is limited. If you want to display input info safely use htmlentities() or htmlspecialchars(). If you want to input to DB, use the db-specific sanitizer, e.g. mysql_real_escape_string.

0

when use

addslashes()

then the opposite is

stripslashes()

that's all you need.

hope this helps

Hi I added a addslash before submit to database like

[

$bio=addslashes($_POST('bio'));
[/code]

it will add a "\'" before submit .. and everything working fine .. but at the time of edit/ resubmit this form I am getting the following out put

This is old\\' Line
This is new\' Line

Please help me to avoid this issue ..
Thanks in advance

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.