birthday email

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    birthday email

    anyone help me do this so users get sent an email when its there birthday .

    i have added the email code from register to the birthday code in core but it does nowt.

    can anyone help thanks,.

    Code:
     if ($td!=$lbpm[0])
      {
        //echo "boo";
        $sql = "SELECT id, name, birthday  FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate())";
        $ppl = mysql_query($sql);
        while($mem = mysql_fetch_array($ppl))
        {
            $msg = "[card=008]to you $mem[1]"."[/card] $sitename team wish you a great day   .dont get too drunk and tell someone on wap u love them lmao (present)[br/](fireworks)[br/][small][i]p.s: this is an automated pm[/i][/small]";
            autopm($msg, $mem[0]);
    
    $email = $_GET["email"];
    $uid = $_GET["uid"];
    $msg = "\n Username: ".$uid." happy birthday from  ".$sitename." ".$sitename."";
    $subj = "Happy birthday ".$sitename."";
    $headers = 'From: host@yoursite.com' . "\r\n" .
    'Reply-To: host@yoursite.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    mail($email, $subj, $msg, $headers);
    
    
    
    
        }
        mysql_query("UPDATE ibwf_settings SET value='".$td."' WHERE name='lastbpm'");
      }
      
    }
    Wapchat4u


    Topsites4u

    #2
    Fetch also his/her email then change..After birthday..birthday, email..Then change that $email to $mem[3]..it should be mail($mem[3]
    My Blog: http://jhommark.blogspot.com
    My Facebook: http://www.facebook.com/jhommark
    My Official Site: http://www.undergroundweb.tk
    My Community Site: http://undergroundwap.xtreemhost.com

    Comment


      #3
      also $uid should be $mem[1]
      eg:
      PHP Code:
       if ($td!=$lbpm[0])
        {
          
      //echo "boo";
          
      $sql "SELECT id, name, birthday, email  FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate())";
          
      $ppl mysql_query($sql);
          while(
      $mem mysql_fetch_array($ppl))
          {
              
      $msg "[card=008]to you $mem[1]"." Smell[/card] $sitename team wish you a great day   .dont get too drunk and tell someone on wap u love them lmao (present)[br/](fireworks)[br/][small]p.s: this is an automated pm[/small]";
              
      autopm($msg$mem[0]);

      $msg "\n Username: ".$mem[1]." happy birthday from  ".$sitename." ".$sitename."";
      $subj "Happy birthday ".$sitename."";
      $headers 'From: host@yoursite.com' "\r\n" .
      'Reply-To: host@yoursite.com' "\r\n" .
      'X-Mailer: PHP/' phpversion();
      mail($mem[3], $subj$msg$headers);




          }
          
      mysql_query("UPDATE ibwf_settings SET value='".$td."' WHERE name='lastbpm'");
        }
        

      Last edited by something else; 05.07.10, 07:48.

      Comment


        #4
        cheers this works. but the person has to be online to get it. the reason i wanted to add this was to get ppl that havnt been online for a while back on the site by sending them a birthday wish from the site. is there a way of doing that ? ?
        Wapchat4u


        Topsites4u

        Comment


          #5
          No..I think, if someone come to your site then it will be executed..because that's in your cleardata()..if someone has executed that script then it will be processed..
          My Blog: http://jhommark.blogspot.com
          My Facebook: http://www.facebook.com/jhommark
          My Official Site: http://www.undergroundweb.tk
          My Community Site: http://undergroundwap.xtreemhost.com

          Comment


            #6
            so it dosnt have to be the person whos birthday it is . .as long as someone is online to trigger it ?
            Wapchat4u


            Topsites4u

            Comment

            Working...
            X