When people add comments to my site there is always a slash before apostrophies. Is there a line of code that will prevent this from happening?

stripslashes($var)

where $var is the variable with the escape slashes added.

You can use stripslashes function.

string stripslashes ( string cad)
For example:
\' is changed with '
\\' is changed with \'

ch.-

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.