Well what i mean is since you are showing the form and doing the insert all in one file then you can simply create another section of that file to just show a thankyou or whatever.
Example:
<?PHP
$section = split("&", $QUERY_STRING);
// This is our html form
if ($section[0] == 'form') {
echo"<form action='$PHP_SELF?insert' method='post'>\n";
echo"</form>";
}
// Our insert
elseif ($section[0] == 'insert') {
// Do your SQL insert here
msyql_query("whatever");
// Redirect
header("Location: $PHP_SELF?thanks");
}
// Thanks page
elseif ($section[0] == 'thanks') {
// Now if the press refresh it will not do another insert.
echo"form has been completed.";
}
?>