I ofc allready searched but can't find anything that works, even htmlentities is't working:
index.php
:
<head>
<meta charset="utf-8">
</head>
<form action="upload.php" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
titel: <input style="width: 300px; margin-left: 104px;" type="text" name="titel">
<input type="submit" value="UPLOAD">
</form>
and upload.php
:
<head>
<meta charset="utf-8">
</head>
<?php
if(isset($_POST['titel']))
{
$con = mysqli_connect("localhost","trhdrth","fhrth","trhdrth");
$titel = mysqli_real_escape_string($con, $_POST['titel']);
mysqli_query($con, "INSERT INTO artikel (titel)
VALUES ('" . $titel . "')");
}
?>
When titel
is blablabla
then everything i working but when it's смешные
then it' not working
How to do it right?