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
What would be my excel formular to find the percentage of errors
Mysql Query to select from two tables
Grub menu in not loading on ESXi 4
Excel 2007 Can Not Display Images From Web
Change the login name of a user in a SQL Server 2005 database
SSRS Combine two datasets into one data region - Must be in report not in SQL server
Using sendkeys in SQL
asp.net mssql I have a need to update records where the record column needs modifing in orde to match the Id value
Setting Reporting Services data driven subscription Using Web Service
Javascript to toggle DIVs and scroll to anchor link IF there is an anchor link in URL