Member Avatar


I'm having issues with get_magic_quotes_gpc() function. I download this Ajax File and Image Manager from this site:

I install it on tinymce & fckeditor to test it out. They both work.

I try to link the images and it didn't work and I also realizes the links are not working either.

The issue is that it has "\" backslash on the end of the links.

it looks like this:\"

So I did some research and find this function

I used Example #1 to try to fixed the issue but I'm having problems understanding how to fixed it.

This is my table:

Table: Books
Fields: id (INT(25), primary key, No Null, auto-increment)
Fields: title (VARCHAR(256), No Null)
Fields: contents (TEXT, No Null)

This is my code:


if (get_magic_quotes_gpc()) {

$elm1 = $_POST['ajaxfilemanager']; //ajaxfilemanager is the <textarea id> from the code from Ajax File.

$entity_elm1 = htmlentities($elm1);

$entity_elm1 = mysqli_escape_string($mysqli,$entity_elm1);

$add_contents_sql = INSERT INTO contents (content) VALUES ('$content')";

$add_contents_res = mysqli_query($mysqli, $add_contents_sql) or die(mysqli_error($mysqli));


//close connection to MySQLi



I really appreciate if someone can explain to me how to correct this bug. Thanks!

Be a part of the DaniWeb community

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