Hi,
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:
<?php
$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 in the database:
<tr>
<td class="header">Name</td>
<td class="header">Title</td>
<td class="header">Email</td>
</tr>
but it ends up looking like this in the database:
<tr>
<td class=\"header\">Name</td>
<td class=\"header\">Title</td>
<td class=\"header\">Email</td>
</tr>
Futhermore, it gets processed like this in TinyMCE when I look in the html:
<tr>
<td class="\"header\"">Name</td>
<td class="\"header\"">Title</td>
<td class="\"header\"">Email</td>
</tr>
Because of this the CSS classes and IDs do not work. Is there something I can do that would remove the extra characters?
I tried:
<?php echo stripslashes($row->content); ?>
but that did not change the output
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:
http://saugustv.org/indexLiveTest.php?page=2
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