How do i expire memberships ?

Discussion in 'PHP' started by smudger, May 11, 2008.

  1. #1
    help !

    I have a modelling website

    the models membership needs to be deactivated if and when their height OR photos OR GP letters are out of date.

    Height and shots have to updated 3monthly for younger ages and
    6 monthly for middle years and then annually for older ones.
    GP letters expire after 6 months (for all ages groups)

    how can i get PHP to automate this for me & also to send an email to the model explaining why their account has been suspended?



    thanks
     
    smudger, May 11, 2008 IP
  2. cornetofreak

    cornetofreak Peon

    Messages:
    170
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i would use cron jobs to do this something like this

    <?php
    include "./../config.php";
    mysql_query('DELETE FROM comments WHERE date < DATE_SUB(NOW(), INTERVAL 10 DAY') or die (mysql_error());
    
    echo "If No Error <br><br>ALL DELETED<br>";
    
    ?>
    PHP:
    then just use cron to run once a day there is better ways but im not the best myself
     
    cornetofreak, May 11, 2008 IP
  3. smudger

    smudger Active Member

    Messages:
    258
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Wow !

    thats great that has really helped me,

    i think i was trying to make things very hard for myself

    many thanks
     
    smudger, May 11, 2008 IP
  4. cornetofreak

    cornetofreak Peon

    Messages:
    170
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    your welcome mate keep up the wows
     
    cornetofreak, May 11, 2008 IP