Site Cloner PHP Script
Bargain Hunter PHP Script
Job Hunter PHP Script
Site Login and Access Control PHP Script

Javascript Auto Submit Form

Online courses, and other forms may have the need to submit the information after a specific time period. For example, a student may have 30 minutes to complete a course. If the course is not completed on time, submitting the work automatically is much like a teacher grabbing the exam paper at the bell. Students may try clever things, but using the autocommit, sessions, ip tracking and cookies could ensure that the exam is rather cheat-proofed and submitted on time.

Here is the javascript code which can go above the form in the php file.

<script>
function submit_it() {
//The dom below shows which form to select
//document.forms[1].my_form_name.click();
//or
document.forms[1].elements[‘my_form_name’].click();
}
//automatically submit form after 52 minutes which is 6000ms * 52min=31800000ms
//setTimeout(“submit_it()”,31800000);
setTimeout(“submit_it()”,10000);
</script>