real_escape_string($_POST['tekst']); $_SESSION['tekst'] = $tekst; $sql = "INSERT INTO comments (tekst)" . "Values ('$tekst')"; if($mysqli->query($sql) === true){ $_SESSION['message'] = "Dodanie komentarza się powiodło!"; header("location:post.php?post=$post"); } else{ $_SESSION['message'] = "Nie udało się dodać komentarza!"; } } ?>