JohnDoe1 Posted July 20, 2009 Share Posted July 20, 2009 Is there anyway I could create a timestamp in say a form and have it remind me in 30 days after the form was submitted? A reminder as in a popup or email something like that.This should be my last question. hope I'm not cluttering the forum up.thanks Quote Link to comment https://forums.phpfreaks.com/topic/166581-timestamp-reminder/ Share on other sites More sharing options...
ignace Posted July 20, 2009 Share Posted July 20, 2009 <input type="hidden" name="timestamp_created" value="<?php print mktime(0, 0, 0, 1, 1);/* 1 january */ ?>"> $timestamp_created = (int) $_POST['timestamp_created']; $a = time() - $timestamp_created; $thirtydays = 2592000; // 30 days in seconds $alertinhour = $thirtydays + 3600; if ($a > 2592000 && $a < $alertinhour) { //set some flag the mail have been send, so it doesn't get send twice mail(..); } Quote Link to comment https://forums.phpfreaks.com/topic/166581-timestamp-reminder/#findComment-878538 Share on other sites More sharing options...
patrickmvi Posted July 20, 2009 Share Posted July 20, 2009 It all depends what you're doing with the form. I would suggest you just save your submitted data along with a timestamp in a MySQL table and then write a script that you set up in your cron to run once a day to send out your reminders. Quote Link to comment https://forums.phpfreaks.com/topic/166581-timestamp-reminder/#findComment-878647 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.