Good day!
In the database "cars", in the table "marki" there is a field "json".
I inserted the name of the stamps into it via json_encode.
Now you also need to insert brand names through "htmlspecialchars".
To also displayed!
But inserts an empty string. How to fix the code?
My code is:
$marka=@$_POST['marka_name']; $far=array('marka_name'=>$marka); $json1=htmlspecialchars($far); $sql="INSERT INTO marki (json)value('$json1')"; $res = mysqli_query($connect,$sql); if($res){ echo "<script>window.location='index.php'</script>"; } 