English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

program let the user insert information in the form then they can submit the form and all the info is store in dtbs(mySQL).problem is,user only can submit the form (different subject ID) within time given.example, user only can submit form on today (150307) before 12midnite on that day.if user send form on 12.01 on the nex day (160307) the form will not be send and insert into the dtbs. i know this can be done by using javascript. but i dont know how to intergrate using the php and the checking process.hopefully u guys can help me asap and provide full coding. tq very much...


Subject ID:
Week:
Date:
Learning Area:

2007-03-14 15:07:51 · 3 answers · asked by Lullaby 1 in Computers & Internet Programming & Design

how to generate it automatically??

2007-03-15 20:24:34 · update #1

3 answers

if (date("dmy") < "160307") {
// dont submit form
}
else {
// submit form
}

http://us2.php.net/manual/en/function.date.php

2007-03-15 06:31:54 · answer #1 · answered by rob 3 · 0 0

My suggestion is not to use JavaScript. If somebody has disabled JavaScript in his/her browser, your timer will not work. The best approach is to use PHP to validate the time. When user submits the form, on the next php script where u r inserting data into db, first check if the time is within the limits. If it is, insert data into db otherwise, redirect user to some other page informing that the time is over.

2007-03-19 19:21:47 · answer #2 · answered by Atif Majid 3 · 0 0

don't comprehend the question too properly yet An occasion maybes may well be: 2 buttons on an internet site to call 2 diverse scripts a million button is the positioned up button of the login type the different button is the positioned up button of the registration type Is that someplace on the line? they are 2 seperate buttons which call 2 diverse scripts clarify slightly extra on your difficulty and paste your cutting-edge code in case you have completed any. What are the buttons for? what's going to the scripts do whilst they are led to?

2016-11-25 20:52:17 · answer #3 · answered by ? 4 · 0 0

fedest.com, questions and answers