Jump to content

content output via TinyMCE


Recommended Posts


I'm not sure if this is a PHP issue or TinyMCE. I have content that is saved in a database. It gets called using this code:

		$page = (isset($_GET['page'])) ? $_GET['page'] : "1";
		$sql = "SELECT content FROM pages WHERE id='$page'";
		$result = $conn -> query($sql) or die(mysqli_error());
			if($result) {
			$row = $result->fetch_object();
				echo $row->content;

The problem is when the code is out put on the site. I save the html like this:

<td class="header">Name</td>
<td class="header">Title</td>
<td class="header">Email</td>

but it ends up looking like this:

<td class=\"header\">Name</td>
<td class=\"header\">Title</td>
<td class=\"header\">Email</td>

Futhermore, it gets processed like this in TinyMCE:

<td class="\"header\"">Name</td>
<td class="\"header\"">Title</td>
<td class="\"header\"">Email</td>


Because of this the CSS classes and IDs do not work. Is there something I can do that would remove the extra characters?


Link to comment
Share on other sites

still not working

Here's the current page: http://saugustv.org/index.php?page=contact

and here's the page with the call to the database and the text editor:


They use the same CSS but as you can see they don't look the same.

Any help would be appreciated - I'm clueless at this point

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.