<script>
function startCountdown(id, seconds) {
var countdownElement = document.getElementById('countdown-' + id);
function updateCountdown() {
if (seconds <= 0) {
countdownElement.innerHTML = "00:00:00";
return;
}
var hours = Math.floor(seconds / 3600);
var minutes = Math.floor((seconds % 3600) / 60);
var remainingSeconds = seconds % 60;
countdownElement.innerHTML =
(hours < 10 ? "0" : "") + hours + ":" +
(minutes < 10 ? "0" : "") + minutes + ":" +
(remainingSeconds < 10 ? "0" : "") + remainingSeconds;
seconds--;
}
updateCountdown();
var countdownInterval = setInterval(updateCountdown, 1000);
}
</script>Hocam ilk baş böyle basit bir şey düşündüm fakat kayıt olayını nasıl yapacağımı bilmiyorum, sqle kaydetsem php ile saniye başı sunucuyu aşşırı yorar. Cookieye kaydetmek geldi aklıma fakat o da aynı şekil, buna bir alternatif bulabilir miyiz?