Microsoft
Software
Hardware
Network
Question : PHP time diffrence and if statement
Dear Experts,
I need to check the time diffrence, I do not want my user to submit the form over and over again.
I already use Captcha by the way and I'm new to PHP.
$query = "SELECT Email,Date FROM mytable where Email='$visitoremail'";
$result = mysql_fetch_row($query);
$date_comingfrom_database = $result['Date'];
$todaysdate = date('Y-m-d H:i:s');
// I insert the date like this $todayis = date('Y-m-d H:i:s') ;
// I want to check the time diffrence and the email address, if the same email address has submited the form within 300 seconds (5 minutes) then
// echo "your message has already been submitted."
Related Solutions:
if statement..
Answer : PHP time diffrence and if statement
something like
1: 2: 3: 4:
if ( strtotime("now") - strtotime($todaysdate) <= 300 ) { echo "record exist." }
Random Solutions
exchange 2010, user has left company, simple way to get all users new emails to different user?
Intel(R) Celeron(R) D CPU 3.06GHz on a Linux machine
How to stablish a proper setup in MS Outlook 2003 encrypting mails
Can't locate DBI.pm in @INC
Office communicator user script
Running the System Update readiness tool.
Searching in Windows 7 Ultimate and Wind 2008 Server how do I search accurately?
OCS 2007 R2 and Cisco call manager
Cisco "Do wr" does not work in "conf t" mode or any other sub-mode
Motherboard driver CD for HCL - P5GD2-TVM/GB/SI