PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 31st, 2002, 09:56 PM
Decsonic Decsonic is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 4 Decsonic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face PHP help needed

i tried to make a "reset script"
at 12 a clock
it would add 1 "day" to days been a member
But it would only work if u refreshed acactly at 12 a clock
how can i get it to do that when the clock hits 12
without the member needed to be even logged in??

Reply With Quote
  #2  
Old October 31st, 2002, 10:12 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Quote:
i tried to make a "reset script"
at 12 a clock
it would add 1 "day" to days been a member
But it would only work if u refreshed acactly at 12 a clock
how can i get it to do that when the clock hits 12
without the member needed to be even logged in??

That is very unclear on what you are trying to do.... Are you trying to show a calculation on how many days a person has been a member?
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #3  
Old October 31st, 2002, 10:22 PM
Decsonic Decsonic is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 4 Decsonic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
yes
plz anyone

Reply With Quote
  #4  
Old October 31st, 2002, 11:06 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
your going about this the wrong way, firstly when the person signs up, you need to use the microtime function, this will give you a time based on how many seconds since 1970

so you will have a number like 231546231316 (jibberish), ok, save this in the database with the users username and password,

ok, now that you have done that, you need to do something really easy,


when you need to figure out how many days, get the microtime in the datbase, lets call it $regTime for the registration time

then, you need something like this
PHP Code:
 $currTime microtime();

$time $currTime $regTime//this will give you how many seconds since they registered.

$time ceil($time 60 60 24); // this will give you the days since signing up.

echo $time 


thats all you need to do. And that is the most easiest way to do it as well.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > PHP help needed


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 5 hosted by Hostway