I'm trying to do a mysql query in php. One of my data is a variable from javascript. I managed as follows. Echo returns the correct value, but I do not understand why the query does not want to be executed. How can I fix this?
...
$value = "<script>document.write(localStorage.getItem('sumalist'));</script>";
echo $value; // yes, value is correct
if ($polaczenie->query("INSERT INTO zamowienia VALUES ('$value')"))
$_SESSION['udanezamowienie'] = "Zamówienie zostało wysłane!!";
...