На сервере:
$sql = mysql_query("INSERT INTO temp (login, id, date, status) VALUES ('$login', '$id', '$komm', '$time', '0') ");
$data = array(
	'status' => 'success',
	'redirect' => '/page',
	'message' => 'Действие успешно! Ожидайте!'
);
print(json_encode($data));
На клиенте:
function nameMethod() {
    $.ajax({
        url: '/url',
        dataType: "json",
        type: 'POST',
        success: function (response) {
            window.setTimeout(function () {
                  alert(response.message)
                }, 2000);
            window.location.href = response.redirect;
        }
    });
}
<button type="button" onclick="nameMethod()">Submit</button>