I created a PHP page containing a tinymce editor(WYSIWYG). This is used to update a single value in a database. On my development machine it works fine, however when in production it only saves a part of the text or nothing at all.
PHP CODE:
<form method="post">
<div class="form-group">
<?php
if(!empty($_POST))
{
$param = "{$_POST['editor']}";
echo "<script> alertify.alert('{$param}'); </script>";
//echo '<script> alertify.notify("Opslaan geslaagd", "success"); </script>';
if(($stmt = $mysqli->query("UPDATE help SET _value = '{$param}' WHERE id = 1")))
{
echo '<script> alertify.notify("Opslaan geslaagd", "success"); </script>';
}
else
{
echo $mysqli->error;
}
}
?>
<textarea class="editor" name="editor" id="editor">
<?php
if($result = $mysqli->query("SELECT _value FROM help WHERE id=1"))
{
$row = $result->fetch_assoc();
echo $row['_value'];
}?>
</textarea>
</div>
<button type="submit" class="btn btn-primary">Opslaan</button>
</form>
MYSQL STRUCTURE: mysql structure
PHP VERSION DEVELOPMENT: 5.6
PHP VERSION PRODUCTION: 5.5.2.3
Anybody knows what the problem is, and how I can solve it?