Dicko_md Posted June 24, 2013 Share Posted June 24, 2013 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 Link to comment https://forums.phpfreaks.com/topic/279503-pulling-datestamp-into-html-email-help-required/ Share on other sites More sharing options...
Barand Posted June 24, 2013 Share Posted June 24, 2013 Have you checked that the $info array contains what you expect? Link to comment https://forums.phpfreaks.com/topic/279503-pulling-datestamp-into-html-email-help-required/#findComment-1437612 Share on other sites More sharing options...
Dicko_md Posted June 24, 2013 Author Share Posted June 24, 2013 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 Link to comment https://forums.phpfreaks.com/topic/279503-pulling-datestamp-into-html-email-help-required/#findComment-1437615 Share on other sites More sharing options...
Dicko_md Posted June 24, 2013 Author Share Posted June 24, 2013 Sorry my fault. Oversight. I had 2 emails as it was an if statement and I hadn't updates the $timestamp in the other email script. Sorry and thanks Link to comment https://forums.phpfreaks.com/topic/279503-pulling-datestamp-into-html-email-help-required/#findComment-1437617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.