header("Location: index.php"); yerine
html yönlendirme yaptım. (<meta http-equiv="refresh"
content="0;url=index.php">)

fakat header komutunun orada hata vermesini de anlamış değilim. hiçbir çıktı yok orada...