Jump to content

Pulling datestamp into html email ? Help required


Go to solution Solved by Barand,

Recommended Posts

function SendReminder($info, $isadvanced) {
 $sitename = GetConfig('sitename');
 $siteurl = GetConfig('siteurl');
 $comment = stripslashes($info['shcomment']);
 $stub = db_select('ar_members', 'id', "id=$info[userid]");
 if (!mysql_num_rows($stub)) {
  db_delete('ar_notify', "id=$info[id]");
  return;
 }
 $tzoffset = GetUserOffset($info['userid']);
 $formdate = time()-$tzoffset;
 $formdate = date("l jS F Y H:i", $formdate);
        $timestamp = date("l jS F Y H:i", $info['date_field']);
 $timecreated = date("l jS F Y H:i:s", $info['timecreated']-$tzoffset);

This gets sent in an email but its blank

$message .= "<tr style='background: #eee;'><td><strong>Event Date:</strong> </td><td>" .$timestamp. "</td></tr>";

 

Ive tried adding the $timestamp line in but this still doesn't work.

 

If I have $formdata in the $message email it shows the time the email was created not the time of the event.

 

The date_field is the column in the database where I am getting the data from. Its a unix style date.

 

Thanks in advance

 

Martyn

Hi yes I have run a echo and it says the time the actual reminder was set for.

$message .= "<tr style='background: #eee;'><td><strong>Event Date:</strong> </td><td>" .$timestamp. "</td></tr>";

Its this line that's not playing ball. Its just empty in the email but all the other info is there.

 

Thanks

 

Martyn

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.