Jump to content

if $contact_date == date{ EMAIL ? } ???


shane85

Recommended Posts

hey guys, I have a field in my db called contact_date....im using strtotime from a user submitted form on when to be contact next, to it adds strtotime+1day +2 day etc etc, so it enters a time stamp in my db. What I want to do is have it so it automatically, without manually executing a script, do pretty much the following

 

if ($arrEntry['contact_next'] == date())
{
send email to $arrEntry['representative'];
// subject for email here
// message for email here
The following prospects need to be contacted today:
// dunno if need a function to print multiple entrys... put it in anyway
function print_prospectEntry($arrEntry)
   {
      $arrEntry['company_name']; // show company name
      $arrEntry['phone']; // show company phone number
      $arrEntry['email']; // show email address
   }

$prospectEntries = mysql_query('SELECT *, UNIX_TIMESTAMP(tstamp) AS tstamp FROM prospects') or trigger_error(mysql_error());

// Display prospect Entries that are = to the time stamp of today

while ($prospectEntry = mysql_fetch_array($prospectEntries))
{
print_prospectEntry($prospectEntry);
}

}

 

 

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.