Problems in inserting data using “safe way to input data to mysql using PHP”?

khichi

New member
Problems in inserting data using “safe way to input data to mysql using PHP”?

I a trying to input data using forms into the mysql, and also using mysql_real_escape_string for this purpose, But unfortunately i am having a problem with out put, Its displays "\" or if i use stripslashes then it removes all slashes, For example

if i use to submit "web's forms using backslash \" i get this output
"web\'s forms using backslash \", See i got double slash, But if i
use stripslashes function then it removes all slashes but also removes
inputed slash and the out put is "web's forms using backslash" see here
no backslash displayed. But i used to input one backslash.

The problem is that if someone uses backslash in password field and any other filed, then the backslash will be stripped or displayed twice.And also please tell me what is best for displaying output htmlentities or htmlspecialchars
 
Back
Top