Jump to content

Using RTE all "s turn into \" why?


alisemail

Recommended Posts

So I've installed an RTE thats javascript based and utilize it to styelize text. When submitted the following code executes

 

	$content = $_POST['rte1'];
$name = $_POST['name'];
$year = $_POST['year'];
mysql_query("INSERT INTO $campaign_table (name, current, year, overview) VALUES
		('$name', '$current', '$year', '$content')");

mysql_close($link);

$confirm = "<h2>$name for $year has been added!</h2>\n";
$confirm .= "<p>The Details is as follows</p>\n";
if($current == 1)
{
	$confirm .= "<p>This campaign is marked as the current campaign</p>\n";
}

$confirm .= "<p>" . $content . "</p>\n";

 

In the MySQL Database the following is the value:

<span style="font-weight: bold;">ddsdsd 

</span>

 

When I echo it out in the page with

<? if(isset($confirm))
{
	print $confirm;
}
?>

(I've tried both print and echo both do the same)

 

The source code shows

<p><span style=\"font-weight: bold;\">ddsdsd 

</span></p>

 

 

Any ideas as to why these \'s are added?

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/36799-using-rte-all-s-turn-into-why/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.