dragosf Posted February 17, 2010 Share Posted February 17, 2010 Hello, I'm stuck with something and I wasn't able to locate a solution to this. So I have a register form that calls for a php page to send a message: include('language/' . $setts['site_lang'] . '/mails/register_approval_user_notification.php'); The code for register_approval_user_notifications.php: <? $row_details = $db->get_sql_row("SELECT u.user_id, u.name, u.username, u.email FROM " . DB_PREFIX . "users u WHERE u.user_id='" . $mail_input_id . "'"); $send = true; // always sent; ## html message - editable $html_message = '<html> <head> <TABLE WIDTH="745" BORDER="0" BGCOLOR="white" CELLSPACING="2" align="center" CELLPADDING="5"> <tr><td> Bună ziua! <br> <br> Stimate vizitator AUXELL, <br> ETC! <br> [b]Show date and time here:[/b] </td></tr></table></head></html>'; $html_message = sprintf($html_message, $row_details['name'], $setts['sitename'], $row_details['username']); send_mail($row_details['email'], $setts['sitename'] . ' - Confirmarea inregistrarii', $text_message, $setts['admin_email'], $html_message, null, $send); ?> Can someone tell me how I can add the date and time when the mail is being sent after: Show date and time here: ? Link to comment https://forums.phpfreaks.com/topic/192349-html-and-php/ Share on other sites More sharing options...
ram4nd Posted February 17, 2010 Share Posted February 17, 2010 generate time by using date() function and when the form data is added to sql then add the time aswell. Link to comment https://forums.phpfreaks.com/topic/192349-html-and-php/#findComment-1013569 Share on other sites More sharing options...
dragosf Posted February 20, 2010 Author Share Posted February 20, 2010 I don't write data on MySQL. I'm taking the info from it. Link to comment https://forums.phpfreaks.com/topic/192349-html-and-php/#findComment-1015134 Share on other sites More sharing options...
teamatomic Posted February 20, 2010 Share Posted February 20, 2010 Somewhere near the top of your page: $time=date("F j, Y, g:i a"); then edit it to this: Show date and time here:'.$time.' HTH Teamtomic Link to comment https://forums.phpfreaks.com/topic/192349-html-and-php/#findComment-1015142 Share on other sites More sharing options...
ram4nd Posted February 21, 2010 Share Posted February 21, 2010 I don't write data on MySQL. I'm taking the info from it. It doesn't matter date is still you solution. Everything you need is at php.net Link to comment https://forums.phpfreaks.com/topic/192349-html-and-php/#findComment-1015584 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.