JQuery otomatik olarak göndermek oluşturmak, ama hiçbir şey döndürür

0 Cevap php

Ben sayım yapmak için Keith jQuery Countdown 1.5.8 kullanıyorum ve saatli her kullanıcı için mükemmel çalışıyor. i tek bir php dosyasında 2 formları (en multiform.php diyelim) ama geri sayım sıfıra ulaştığında formu şey gönderir.

İşte benim jquery kodu:

<script type="text/javascript">
$(function () {
    $('#defaultCountdown').countdown({until: <?php echo($usertime); ?>,
    onExpiry: function() {
        $('#quizform').submit();
    }
    });
});
</script>

ve benim multiform.php kodları bazıları şunlardır:

<?php
    if($choice==1) {
?>
...
<form action="submit.php" method="post" name="quizform" id="quizform">
...
...
<input type="submit" name="save_1" value="Save" />
</form>

<?php
    } else {
?>
...
<form action="submit.php" method="post" name="quizform" id="quizform">
...
...
<input type="submit" name="save_2" value="Save" />
</form>

ve submit.php oluşur:

if(isset($_POST['save_1'])) {
    ...do part 1
}
else {
    ...do part 2
}

The form submits nothing, none of those text input values submitted to "submit.php". It returns blank. Am i doing wrong ?

0 Cevap