Jump to content

How To Set The 'accepted' Characters In A Database?


Yvil
 Share

Recommended Posts

Hey everybody,Well, the title says it all actually:How to set the 'accepted' characters in a database?(how to disable HTML usage & backslashing)Thanks in advance,YvilAnd thanks FirefoxRocks for helping me out with my last problem :)!

Edited by Yvil
Link to comment
Share on other sites

If backslashes are getting into your database, your web host most likely has PHP magic quotes activated. When magic quotes are activated, and you pass a string through mysql_real_escape_string, the string gets escaped twice, meaning that it appears escaped inside the database.You can test to see if magic quotes is activated or not using get_magic_quotes_gpc()Then you can use stripslashes to remove the redundant slashes.

Link to comment
Share on other sites

Uuuh, I didn't really get what I should do to fix it (sorry, still pretty new to database usage).Could you please write me some code on how and where to do all that?And also, how do I disable HTML usage?

Edited by Yvil
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...