Jump to content


Photo

Short advice.


  • Please log in to reply
4 replies to this topic

#1 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 08 August 2006 - 01:57 PM

Hi.
Would someone be able to give me some advice on the easiest and
most effective way of going about checking account activations.
Basically when they register it will register the time and date, I wanted
to check if the account has been activated with in 15 days,

If it has obviosuly the time and date will become the "last login" otherwise
it would stay the registered date & time. Clearly this way would work using
MYSQL, but I have no idea how to go about it.

If the acocunt has not been activated within 15 days I wanted it to be
deleted automatically.

#2 leeming

leeming
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts

Posted 08 August 2006 - 02:05 PM

Hi.
Would someone be able to give me some advice on the easiest and
most effective way of going about checking account activations.
Basically when they register it will register the time and date, I wanted
to check if the account has been activated with in 15 days,

If it has obviosuly the time and date will become the "last login" otherwise
it would stay the registered date & time. Clearly this way would work using
MYSQL, but I have no idea how to go about it.

If the acocunt has not been activated within 15 days I wanted it to be
deleted automatically.


how is the date recorded? is it a datetime field, or set by time()
Im not perfect ;) lol

#3 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 08 August 2006 - 02:12 PM

The date and time is set by:
date("d-m-y"); [nn-nn-nnnn]
date("g:ia");    [n:nam/pm]

#4 leeming

leeming
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts

Posted 08 August 2006 - 02:20 PM

some thing like this...

$borderdate = mktime(0, 0, 0, date("m"), date("d")-15 ,  date("Y"));  //15 days ago

mysql_query("DELETE FROM <table> WHERE `signup_date` =< '$borderdate');

BUT... im only guessing, try running the same ish query but as a select, so see if it picks up the right members
Im not perfect ;) lol

#5 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 08 August 2006 - 02:24 PM

I'll have a go.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users