General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 5th, 2003, 03:42 PM
Rollin Rollin is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 Rollin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Rollin
Membership freezes....but how ?

Hello there,

I would firstly like to say that any answer would be welcome, and that I hope you help me abit in that.

I am reading the PHP and MYSQL web development book of Luke Wellin and Laura Thomson. I want to create the mbership system that describes the book, everything works fine but I'd like to add something more.
I want my member's account to get frozen in a month and then be able to activate them again....that could be a year or 2 weeks it doesn't matter. I just need to find a tutorial about it, because I am not like the super-pro in php and can't make it by my own.

Any help would be appreciated !

Regards,
Jim

Reply With Quote
  #2  
Old March 5th, 2003, 06:09 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Jim,

I have actually never come accross a article that shows you how to do this. However I'll give you a suggestion how to.

Firstly in your members table, you will need to store the date they signed up (datejoined-timestamp) and a active field (active-enum) with the values 0 or 1

Then you need to create a cron job (linux) to run once a day

Then you would run something like

$days = 10;//if user is older then x days then the account will disable

$time = time() - (60*60*24 * $days)

mysql_query("select * from member_table where unix_timestamp(datejoined) <= '$time' and active = 1");

That query should return all members who are older then 10 days and currently active.

Reply With Quote
  #3  
Old March 5th, 2003, 07:11 PM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 366 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 59 sec
Reputation Power: 7
so I do it about the same way,...I store my enums are either Y or N active=Y or active=N
__________________
-- Jason

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Membership freezes....but how ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT