How do i avoid send data when i reload ?

I want to send a data from my page called is index.php, the action is with same page, so i can get $_POST[‘submit’] in index.php, when i submit data is save succesfully to my database, but when i reload the page data still save to my database. my question is how do i avoid send data when i reload it ?

Thanks…
my php code …
[php]

<?php $name = $_POST['name'] ; $email = $_POST['email'] ; $website = $_POST['website'] ; $comment = $_POST['comment'] ; if(isset($_POST['submit'])){ $message = "" ; $SQL = "INSERT INTO comments (name, email, website, comment_text ) VALUES ('$name', '$email', '$website', '$comment' )" ; $result = mysql_query($SQL) ; $message = "Your Comment was successfully sent." ; } else { $message = "fail" ; } ?>

[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service