header ("Location: http://" . $domain . $directory . "index.php");


Yerine
echo "<script>location.href='".$_SERVER[HTTP_REFERER]."';</script>";

yazman yeterlidir