The table user_content has the columns id, context_text, email_last_edit.
This is my update method:
$content_text1 = utf8_decode($_POST['content_text1']);
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Datenbankverbindung fehlerhaft: " . $conn->connect_error);
}
$sql = 'UPDATE user_content SET content_text="' . $content_text1 . '" AND email_last_edit="' . $email . '" WHERE id=1';
if ($conn->query($sql) === TRUE) {
//echo "New record created successfully";
} else {
echo "Datenbank-Fehler: " . $sql . "<br>" . $conn->error;
}
$conn->close();
I send this text via post to the same php page:
<h1><b>Mitglied</b></h1><br><b>Community</b>
<b>Kurzprofil</b>,ß<b>Community-Bereich</b<b>Chats</b>.
Unfortunately, every update the column content_text becomes 0. I think it is a problem with the special characters in the text, but uft8_decode() does anyhow not fix this problem.
Does anyone know a solution to this? Thanks a lot :)