Jump to content

Timestamp Reminder


JohnDoe1

Recommended Posts

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

Link to comment
Share on other sites

<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(..);
}

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.