I'm using this header('Location:index.php'); to get my page reload after user press the submit button.
It's working like a charm, but if you take a look at the PHP manual there is: "Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP".
$comment = $_POST['comment'];
$writer = $_POST['writer'];
$date_and_time = date('Y-m-d H:i:s');
mysql_query("INSERT INTO comment (writer, comment, date_and_time)
VALUES ('$writer', '$comment', '$date_and_time')")
So am I doing something very wrong or not ?