session_start();
require 'db-conn.php';
$u1 = $_POST['ricevente'];
$u2 = $_POST['richiedente'];
if(isset($_POST['accetta'])){
$sql = "UPDATE amici SET amicizia=1 WHERE utenteDue='$u2' AND utenteUno = '$u1';";
$sql55 = "INSERT INTO notifiche (idRichiedente, idRicevente, tipoNotifica) VALUES ('$u2', '$u1', '2');";
$result55 = $conn->query($sql55);
$result = $conn->query($sql);
}elseif(isset($_POST['rifiuta'])){
$sql = "DELETE FROM amici WHERE utenteDue='$u2' AND utenteUno = '$u1'";
$result = $conn->query($sql);
}else echo "Si รจ verificato un errore";
This is my code, it only computes the $sql variable while not the $sql55. Can you please tell me why? The variables are fine and just okay (the first query goes well).