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
Firing jQuery on key press action
CodeDom and Windows Forms
I have designed an website in flash as well in html, if the browser dont have flash then i want them to be directed to the html version, or else they need to directed to flash version
Deploy Printers Using Windows 2008 R2 GPO to Windows XP Pro Clients and Removing all current printers
SQL 2008 Job can't start/stop services
HTTPS keeps Rest connection [RST,ACK]
DELL LATITUDE D610 80GIG STUCK IN BOOT LOOP
Delphi Pagecontrol - each Tabsheet has its own popup menu
Return Ref
Blackberry browser 400 error - socketexception Connection reset