After inserting the data, redirect:
header('Location:'.$_SERVER['PHP_SELF']);
.
, $_GET. :
// Redirect and set $_GET variable
header('Location:'.$_SERVER['PHP_SELF'].'?showmsg=true');
div, :
function show_confirmation()
{
return isset($_GET['showmsg']) && $_GET['showmsg'] == 'true';
}
:
<div style="display:<?php echo show_confirmation() ? 'block' : 'none'; ?>">
</div>